Using vba to change a SELECT statement initiated by the user (1 Viewer)

atrium

Registered User.
Local time
Today, 16:25
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
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:25
Joined
May 7, 2009
Messages
19,169
see this demo for the filtering.
 

Attachments

  • order.accdb
    524 KB · Views: 217

Users who are viewing this thread

Top Bottom