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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limiting Combo Boxes with NIL Events

Status
Not open for further replies.

hysonmb

Technical User
Nov 7, 2003
40
0
0
US
I'm wondering if it's possible to have a combo box that has a not in list event also be limited by an entry in another combo box.
I've got a form with a box that pulls offices and each office has smaller offices within it. What I want to do is have the sub office combo limited by the entry in the office box as well as run a not in list even if a new entry is typed into the box. I can make one or the other work fine, but, when i put them both on, it starts running the event and when I click to accept the new entry, it tells me that the item is not in the list.
Is there anything that can be done about this? I imagine that I would have to somehow tell Access that when there is a new entry, it has to let the entry hit the table before doing to requery. I'm not very well versed in VBA so any help is appreciated, but, Barney style help is preferred.
Thanks.
 
Use the AfterUpdate Event of the first combo box to set the RowSource Property of the Second Combo box as a SQL Statement that is based on the value of the first combo box.

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
 
OK, that sounds like it makes sense, but, I'm no programmer so once I try this, I'll write back and say yea or nay if I get it right. I want to learn VBA so I don't mind screwing with this thing for a while. They're paying me to do it anyway ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top