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

Turning off Cascading Combo Boxes

Status
Not open for further replies.

bcooler

Programmer
Jun 13, 2009
132
I have a form called frmReturn that is initally used by the user to record a serial number (among other things). The initial list I had was way too long, so I tried to create cascading unbound comboboxes where each progressive combobox (Program Name, Part Number, Serial Number) relied on the previous combobox entry. The last combobox (bound) chooses the serial number and the data is stored in the record. This is done via a recordsource query.

This works great. My next step is to let the next user open the same form and add more information in other areas of the form. At this point, the serial number info needs to be informational only.

The problem is the reopened form shows the unbound info as empty (makes sense) and then won't show the bound serial number combobox since the recordsource depends on the previous cascading comboboxes to be filled out.

My question is: Is there a more graceful way out of this problem than using event based VBA to change the intitial recordsource via SQL (based on whether the user is trying to enter new data or adding to it)? That will be a lot of work if so and I've got to think there is a much more graceful way to handle it.
 

Hi bcooler,

If I understand right, the 'next user' won't use the combo boxes at all. so then why leave the combo's on the form?
I would suggest you should made a new form (you can make 'save as' - or press F12 - from your current form) without the unnecessary combo's, at just change the control source & row source, so it should present the entire list of serial numbers, as you want.

Was this of some help?
Ja
 
Yes, that would work. I just hate having almost duplicate forms floating around. I think I'm going to just make the text boxes you recomended, but on the original form and play games with "visible" to turn the combo boxes and text boxes on and off. I know this violates the "graceful" requirement, but it will be less overall forms in an already crowded database.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top