Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change field queried on by combo box 1

Status
Not open for further replies.

MICKI0220

IS-IT--Management
Jul 20, 2004
337
US
I need help on creating a procedure that will run a query....Here is the scenario....I have about 25 different fields in a table.....On my form I have created a pop up form with a single combo box on it, so the user can select one of those 25 fields....I need my procedure to take that field identified in the combo box and base it's query on the results selected from that combo box.....Therefor the query will be changing what it queries everytime a different choice is made....In the end I will create a report based on the selection....Does that make sense, can someone help me out...

Thank you in advance


 
Alex

Wow, that bad?...I still came up with a syntax error, but I figured out how to put in a comma and it is working great. Thanks alot for your help....I really don't think I would have figured it out on my own...

Micki
 
Ah, yes. I missed the comma after job description. Glad it helped!

For the record, your initial SQL would look something like this (I attempted to parse it in my head, but I think it's close):

Select [job_idjob_descriptionCombobox.Value
]From Constant WhereCombobox.Value]Is not Null

Notice the missing spaces, missing commas, and the stray brackets. The hardest part sometimes is getting the commas and spaces straight! A fresh set of eyes usually helps.

Take care,

Alex

It's a magical time of year in Philadelphia. Eagles training camp marks the end of another brutal season of complaining about the Phillies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top