Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mail Merge SQL

Status
Not open for further replies.

rookery

Programmer
Apr 4, 2002
384
GB
Not certain this is the correct forum but can anyone tell me why the following code:

SQLStatement:="SELECT * FROM [Contacts] WHERE [Surname]= '" & Spires & "' "

within a OpenDataSource command produces a 5631 "..no records.." error and yet:

SQLStatement:="SELECT * FROM [Contacts] WHERE [CustID]=459"

doesn't. It seems as though it works for Number fields but wont search for Strings. Is this meant to do this or have I done something wrong?
 
Ah different data types! Easy when you know how!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top