View Single Post
  #3 (permalink)  
Old March 8th, 2004, 07:52 PM
Steven Steven is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: Melbourne, Vic, Australia.
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I should elaborate:
.RunSQL "SELECT tblA.RecordNo, tblA.[Item No], tblA.[Cust No] FROM tblA WHERE (tblA.[Item No] = ?) AND ((tblA.[Cust No] Like 'D*') OR ((tblA.[Cust No] Like 'A*')) ORDER BY tblA.RecordNo, tblA.[Item No], tblA.[Cust No];"

Or - to space it out a bit nicer:

Code:
.RunSQL "SELECT tblA.RecordNo, tblA.[Item No], tblA.[Cust No] " _
  & "FROM tblA " _
  & "WHERE (tblA.[Item No] = ?) " _
  & "AND ((tblA.[Cust No] Like 'D*') " _
  & "OR ((tblA.[Cust No] Like 'A*')) " _
  & "ORDER BY tblA.RecordNo, tblA.[Item No], tblA.[Cust No];"



I am a loud man with a very large hat. This means I am in charge