Trouble with Option Buttons

G

Guest

I have a form with an unbound option group that I use to filter a combo box
on the form. In the rowsource query for the combo box I reference the option
group to filter the combo box. When the form opens I get prompted to enter a
value for the field I'm filtering on. If I click through it then every thing
works as planned.

Any help would be greatly appreciated. Thanks,

Rob
 
A

Al Campagna

Rob,
What are your control names, and what is your Combo RowSource?
Given an option group called SelectNumber, with possible values of 1, 2, or 3, and
SelectNumber has a Default Value of say 1, and both controls are on the main form...
The criteria in the Combo RowSource query should be...
=Forms!YourFormName!SelectNumber

Also, use the AfterUpdate event of SelectNumber to Requery the combo, so they always
stay in synch.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

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

Guest

Al, thanks for the reply. Since my last post I've gotten the form to work as
I wanted it. Your example below is exactly the way I have it. The problem is
that when I drop this form on to another form, the problem starts again. You
see, I originally started the form as a sub form, and it worked until I
dropped on another form that is a sub form also. I have no idea why it would
work independently and not on another form.

Any ideas, Thanks, Rob
 
G

Guest

Al, Thanks for your response and your comments. With respect to your solution
below, I'm not sure what this means. The SelectNumber part, what does this
refer to? Thanks in advance for trying to help clarify this. Rob
 
A

Al Campagna

Rob,
You didn't provide any field names, so it's just an example field name.
Use the name of whatever object the GroupDescription will use as it's criteria.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

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

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