Combo Box not activating subform

J

Jon M.

Okay, I have a form based on a single table. I have two combo boxes that are
each one field from my table, one is office location and the other is
department. On this form I have a subform, which displays my table I'm
working from. This is soley a lookup form with no new data ever being
entered. When I select my office location and department nothing happens.
If I close the form and then reopen it I see the results I'm looking for.
How can I change this so that after selecting one combo box I get the results
right away I'm looking for? And then how can I make it so the user can use
either one or both of the boxes to get results based on just one box or both?
My ultimate goal would be for the user to select a choice from one or both
combo boxes and click a command button to retreive the desired records in the
subform. Sorry for writing a book here, but I'm lost. As always any help is
greatly appreciated.
 
A

Al Campagna

Jon,
I'll assume that the 2 combos cascade... ex. combo2 depends on the value
of combo1. So you should Requery combo2 on the AfterUpdate of combo1.
On the AfterUpdate event of combo2...
Since you say your combos work properly, and cause the subform to deliver
the correct records (after closing & re-opening the form), then all you
should need is a Requery the subform, on the AfterUpdate event of combo2.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life.
 
D

djf

I have some forms that sound similar to yours. I have two combo boxes, where
one depends on the choice in the other one. In the On Change property of
combo box 1 I simply put in the vba statement:

me.refresh

This refreshes the form without having to open and close it. When I choose a
value in combo box 1, the corresponding values show up in combo box 2.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top