If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Combo Box not activating subform
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. -- Jon M. |
#2
|
|||
|
|||
Combo Box not activating subform
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. "Jon M." wrote in message ... 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. -- Jon M. |
#3
|
|||
|
|||
Combo Box not activating subform
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. "Al Campagna" wrote: 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. "Jon M." wrote in message ... 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. -- Jon M. |
Thread Tools | |
Display Modes | |
|
|