[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Using InputBox to Change Query Criteria

Posted on 2008-11-13
3
Medium Priority
?
557 Views
Last Modified: 2012-05-05
Hello Experts,
I am trying to reduce the amount of queries I have in my database.  I have a query, lets say QRY1, that is the data source for multiple forms.  I want to use the InputBox to add criteria to that query.  I know I can do this in design view of the query, but I have multiple critera depending on the user and I don't want to have QRY1 with the [] under one field, the QRY2 (the same tables as QRY1) with [] under a different field.  Does this make sense?  Can this be done with the InputBox?  Thanks in advance for all who reply.
0
Comment
Question by:cebaker75
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 22951734
"Can this be done with the InputBox? "

A query cannot reference the InputBox AFAIK.  However, you could have a small pop up form with a text box for criteria ... and have the query reference that text box, like so

Forms.YourFormName.SomeTextBoxName

mx
0
 

Author Closing Comment

by:cebaker75
ID: 31516423
Thanks DMX!  That works great.
0
 
LVL 75
ID: 22954123
ok ... you are welcome ...

mx
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question