Sql Statement in vba

teabags

Registered User.
Local time
Today, 00:33
Joined
Jun 29, 2006
Messages
21
I am using the following sql statement to populate a listbox with rows from an Orders query.

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 & "#));

My access form has combo boxes to give values to strCustomer and strDate.

My problem is that when I select a date from my date combo box it dosent always populate the listbox even thought there are records on the date strDate in the query.

The dates are loaded from a row source in The Orders query and are in the same format as the dates in the orders query
 
Requery the list box after each combo box selection, or, when you know both have been updated.
 

Users who are viewing this thread

Back
Top Bottom