OpenRecordset Problem

  • Thread starter Thread starter jsccorps
  • Start date Start date
J

jsccorps

ProductID is an Integer

Set rs = CurrentDb.OpenRecordset("Select * From [Inventory] Where
[ProductID]=" & Me!ProductID, dbOpenDynaset)

works fine. But when i try to add sorting, there is a problem (see below):

Set rs = CurrentDb.OpenRecordset("Select * From [Inventory] Where
[ProductID]=" & Me!ProductID ORDER BY AddDate DESC, dbOpenDynaset)
 
Try:

Set rs = CurrentDb.OpenRecordset("Select * From [Inventory] Where >
[ProductID]=" & Me!ProductID & " ORDER BY AddDate DESC" , dbOpenDynaset)



HTH
 
Back
Top