Using vba to change a SELECT statement initiated by the user

atrium

Registered User.
Local time
Today, 17:04
Joined
May 13, 2014
Messages
348
I have a continuous list of records, I want to change the selection criteria .

How can I do it in vba.

Code:
SELECT Orders.OrdersId, Orders.OrderNo, Orders.Arrived, Orders.DateArrived, Orders.AdditionalComments, Orders.OrderInstructions, Orders.Supplier, Orders.DateOrdered
FROM Orders
ORDER BY Orders.OrderNo;
I know I have to construct a variable that the user has to enter what they want to search for. Then a WHERE statement
  1. to select the order number
  2. to select all records that have the same supplier
  3. to select all records have the same date ordered
What is my best to make this work.

Any help would be appreciated
 
see this demo for the filtering.
 

Attachments

Users who are viewing this thread

Back
Top Bottom