VB filter help please!

holden_1

Registered User.
Local time
Today, 12:56
Joined
Feb 2, 2005
Messages
38
Is it possible to, in VB, on form open have a message box appear where a user can enter (or select from a combo-box based on a qry - preferable if possible!) data to filter by.

for example.

filter by "engineers name" in a form containing records for multiple engineers but the user (the engineer) will only ever want to see records for themselves.

thnaks for any help.

I can do this a fairly long way but i think it would be much slicker in VB! :)

Cheers
 
Do you actually mean VBA or VB?
 
If your talking about VBA then:
Use the Inputbox prompt and pass the value to a query to filter whatever you want.
 
Rather than use Input Boxes or Parameter Boxes the best method is just to create a form that you can reference within a query - that way you can pick the relevant data you need, validate it, check if any records can be returned based on the criteria, and display the results.

Reference controls like this:

Code:
[Forms]![YourFormName]![YourControlName]
 
SJ McAbney said:
Rather than use Input Boxes or Parameter Boxes the best method is just to create a form that you can reference within a query - that way you can pick the relevant data you need, validate it, check if any records can be returned based on the criteria, and display the results.

Reference controls like this:

Code:
[Forms]![YourFormName]![YourControlName]
Yup, just make a Startup form, give it the appearance of a Input Box type control, add the Combo box , give it the control scource of the table field, and base your main form on the query, in the query give the criteria of the combo box at startup for filtering. Just Like SJ said :D
 

Users who are viewing this thread

Back
Top Bottom