First of all my table is in sql server so I know that may affect the answers.
I have a form where I let the user enter a railcar id and then show a list of invoices for that railcar. If I create the query to have a criteria of a value on the form, something like this, [Forms]![NavigationForm]![NavigationSubform].[Form]![RailcarID] it will load in 1-2 seconds.
However, If I create a variable form the value on the form and pass it to the form as a where condition it takes 25 seconds. Something like this
Dim FAvar As String
FAvar = Me.RailCarID
DoCmd.OpenForm "f_AllVendorInvoices-Where", acNormal, , "[RailcarID] = " & Me.RailCarID & ""
Why is there such a big difference in speed and is there a way to speed it up and still just use the where condition?