Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I limit the values in a combo box using the value from another?

Status
Not open for further replies.

GICodeWarrior

Programmer
Jun 1, 2001
11
0
0
US
I can get the values to be limited but they are statically limited(Are limited the same way all the time and do not change when I switch between records or change the value of the combo box that is doing the limiting) I use the query builder in the properties dialog in the Row Source box to get these results. Is there anyway to make it work the way I want?
 
You need to refresh the combo box when the value changes Use...

ON Change event use the code

Docmd.Requery "CONTROLNAME"

You could also add this code to the Form's ONCURRENT event, this will requery the combo box on each new record

Hope this helps
 
Thank you so much!!! That was exactly what I needed and it worked perfectly. I never would have been able to figure that out on my own.

Thanks again, Code Warrior Burchfield

I write code. See code run. Run code run.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top