Sql Statement in vba

teabags

Registered User.
Local time
Yesterday, 20:03
Joined
Jun 29, 2006
Messages
21
I am setting the value of a number of variables on a vb form to query a table. My problem is that the date I pass is not being recognised.

The date is being passed in a date variable in a short date format.

Here is my sql statement

strDate is the date I am passing

SELECT [Shipping Details].[Line No], [Shipping Details].[Item No], [Shipping Details].[Customer PO No], [Shipping Details].Qty, [Shipping Details].[Serial No], [Shipping Details].Packslip, [Shipping Details].Invoice FROM [Shipping Details] WHERE ((([Shipping Details].[Customer Name])='" & strCustomer & "') AND (([Shipping Details].[Ship Date])==#" & strDate & "#));
 
heh :) someone has done too much C style programming ;)
 

Users who are viewing this thread

Back
Top Bottom