A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo Box not activating subform



 
 
Thread Tools Display Modes
  #1  
Old March 2nd, 2008, 07:03 PM posted to microsoft.public.access.forms
Jon M.
external usenet poster
 
Posts: 51
Default 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  
Old March 2nd, 2008, 11:59 PM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default 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  
Old March 3rd, 2008, 03:19 PM posted to microsoft.public.access.forms
djf
external usenet poster
 
Posts: 30
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.