how to pass comparison operator (greater than, less than) to query as parameter

alap43841

Registered User.
Local time
Today, 21:10
Joined
May 9, 2006
Messages
36
Hi all, I am using a database where I have more than 2000 records. I want to create a form where user can select query criteria from several combo box and generate query. All that I could do but I can't pass "greater than" or "less than " symbol as parameter to the query, like I have two text boxes which I can use to pass perameter for "date of birth" and "date of enrollment" and also two combo boxes where user can select "<", ">" or "=" operator. I want that user should be able to select "<", ">" symbol and then put date in the text field to get the result. I am not an expert on VBA, can any one help me with this problem. I appreciate your cooperation in advance.
 
most likely you will have to prepare the appropriate sql string in vba to do this

get a stored query, and look at the sql

you then need to use vba to prodiuce a text string exactly the same, except that you can change this to suit whichever operators you need - then you can use other vba commands to run the query.
 
thaks forquick reply

Thanks for the quick reply, I don't have enough knowledge on how to proceed with this kind of VBA procedure. any example with a sample db will be highly appreciated. thanks again.:o:confused:
 

Users who are viewing this thread

Back
Top Bottom