J
jsccorps
Why is it that the following statements work when run separately.
Set rs = CurrentDb.OpenRecordset("Select * From [Transactions] Where [Date
of Sales]< #" & [Date of Sales] & "# ", dbOpenDynaset)
Set rs = CurrentDb.OpenRecordset("Select * From [Transactions] Where
[SalesRep] = & [SalesRep]", dbOpenDynaset)
However, does not work when the conditions are combined:
Set rs = CurrentDb.OpenRecordset("Select * From [Transactions] Where [Date
of Sales]< #" & [Date of Sales] & "# And [SalesRep]= & [SalesRep]",
dbOpenDynaset)
Set rs = CurrentDb.OpenRecordset("Select * From [Transactions] Where [Date
of Sales]< #" & [Date of Sales] & "# ", dbOpenDynaset)
Set rs = CurrentDb.OpenRecordset("Select * From [Transactions] Where
[SalesRep] = & [SalesRep]", dbOpenDynaset)
However, does not work when the conditions are combined:
Set rs = CurrentDb.OpenRecordset("Select * From [Transactions] Where [Date
of Sales]< #" & [Date of Sales] & "# And [SalesRep]= & [SalesRep]",
dbOpenDynaset)