Form to select items for a query

jstroh

Registered User.
Local time
Today, 02:47
Joined
Aug 29, 2001
Messages
15
I have created a query that will be the source for a report. I want a form that will allow the users to pick what of the query they want the report to reflect. I have the form already but it shows what is already there with all the information not a select type form. Any one know how I can accomplish this?
 
In the future could you please refrain from posting in your questions in multiple forums. Pick one forum that seems relevant and you will be answered. Multiple posts of the same question cause confusion and are deemed not proper forum edicate.
Thnx


If you could please write back and give us a description of the fields in your query, so that we can better answer your question. e.g.
product type, location,

Thnx
 
The database is the people who have applied for a position with my company. What I want to do is search for candidates based on what days they are available to work and what their qualifications are. For example, I want to search for all the candidates who can work on Fridays, Saturdays, Sundays, and Mondays and that is 1stAid and CPR certified who also has a secret clearance with the military. I have set up the tables so all this infomation is there but I want to search for only the candidates who qualify for this position. I think setting up a form where I can place check marks by the list of criteria I want would be the best way to do this, however, I know know how to set this up. Can you help me.

(Sorry about posting in 2 forums, I am new to this and wasn't sure the best place to ask the question.)
 
I am still struggling with my form that manipulates a query. I want a form that allows users to change a query's criteria so a report can be generated based on what the user requests. Where do I start?
 
I would suggest having a listbox that enables the user to pick the criteria for the search. So the user can select "Mondays" and "CPR" or "Mondays", "Saturdays" and "MilitaryClearance".
Basically any combination......

This is code from R.Hicks that will enable you to get the criteria from the multiselect list box to the query:

Dim varItem As Variant
Dim strWhere As String

For Each varItem In Me![YourListBoxName].ItemsSelected
strWhere = strWhere & "YourUniqueIDField =" _
& Chr(39) & Me![YourListBoxName].Column(0, varItem) & Chr(39) & " Or "
Next varItem

strWhere = Left(strWhere, Len(strWhere) - 4) 'Remove the last " Or "

DoCmd.OpenForm "YourFormName", , , strWhere

This is only an example. the names of the objects need to be the names of your objects.

Also the Multi Select property for the listbox needs to be set to Simple or Extended

HTH

Irie

Big Up to R.Hicks for the code!!!
 

Users who are viewing this thread

Back
Top Bottom