3 comboxes on form to update subform with data?

MsLady

Traumatized by Access
Local time
Today, 04:39
Joined
Jun 14, 2004
Messages
438
I have a main form with 3 comboboxes as:
1. Status ("notstarted", "inprogress", "completed")
2. Manager ("john", "jill", "jack")
3. Prioritylevel ("high", "medium", low")

Then on this mainform is a subform with the data.
Now, i want to have it so that when
  • i select status ("notstarted") on my combobox, it updates/refreshes my subform with that data (afterupdate).
  • Then, when i select manager ("John") on the second combobox, it shows me data for that manager and where the status is "not started".
  • Then, when select a third criteria Prirotylevel ("high"), it shows me, the data for that are ("notstarted" and by manager "john" and that has a priortylevel of "high".

i.e. on the afterupdate event (or i can have this driven by a button) of all these 3comboboxes, it should update my subform data with my three or two or one (depending on how many criteria/comboxes options i have selected). I don't even know wehre to begin :(

I don't know how to do this even tho i know what i want. Please help me.
 
Last edited:
please
eusa_pray.gif
 
This might give you a start....... All info displays in the subform when open.... You can change that.... perhaps make it not visible until you click your button to show records....???? Just oprn "frmFilterJobs" and see if this is what your looking for. You could also move the update of the subform to an event on the combo's...... Many options for you to explore.....

Curtis
 

Attachments

CEH said:
This might give you a start....... All info displays in the subform when open.... You can change that.... perhaps make it not visible until you click your button to show records....???? Just oprn "frmFilterJobs" and see if this is what your looking for. You could also move the update of the subform to an event on the combo's...... Many options for you to explore.....

Curtis
this is more than a start.
this is what i've been looking for. thanks alot! you rock!!
thankyou.gif


hmn... tho i don't have a full understanding of everything...
if you don't mind explaining to me:
in the query (qryJobs), i noticed you declared the manager, status and priorty fields twice, one to show the data and the other with a "true" critria. It's a little vague to me, can you tell me what it's doing? :o

here's a picture of what i actually have...I did exactly as your example.
works like charm. hehe ;)
untitled5xv.jpg


thanx alot! :)
 
Actually........ You can remove those 3 from the query ( the fields without the criteria set to "True" :) The fields that have the "True" in criteria are setting your criteria from the combo's. [tblJobs]![StatusID]=[Forms]![frmFilterJobs]![cboStatus] Or [tblJobs]![StatusID]=[Forms]![frmFilterJobs]![cboStatus] Is Null
The first part ' [tblJobs]![StatusID]=[Forms]![frmFilterJobs]![cboStatus] ' sets your criteria to whatever is in your combo box. The criteria being set to “True” is to execute the second half………
“ or [tblJobs]![StatusID]=[Forms]![frmFilterJobs]![cboStatus] Is Null”
If Null is True, then it inserts NO criteria into query.
 
Last edited:
Oh i see! makes sense. thanks for the explanation
I think i'll just leave it the way it is since it works perfectly, scared of breaking things here :D...Anyways, it's good to know.
Thanks quality guru!! :)
 

Users who are viewing this thread

Back
Top Bottom