Change form details based on two combo boxes

jom1918

Registered User.
Local time
Today, 23:30
Joined
Apr 26, 2011
Messages
30
I have two combo boxes in the form header and command buttons in the form detail. The combos allow the user to select either a customer or a prospect, then the command buttons open forms that only show records pertaining to the customer or prospect selected. Combos are "4Custcbo" and "4Proscbo".

1.How do I change which command buttons are available depending on whether the user has selected a customer or a prospect? Do I use two different subforms or is there a better way?

2.How do I hide the other combo box once the user has selected either a customer or a prospect?

I know this is probably really simple, but any help would be appreciated.
 
I would use a check box to determine if you want to show a customer or prospect and depending of what you choose, change the control source for the combo box.
And use the update event for the combo box to open the correct form, (instead of the button).
If you need two forms depend of how different the data you want to show are.
 
As has been suggested you could use a checkbox or option box or toggle buttons.

Me4.Proscbo.Visible = True 'Some Control
Me.4Custcbo.Visible = False

Me4.Proscbo.Visible = False 'Some Control
Me.4Custcbo.Visible = True

HTH
 
Set up the control source for combobox in the right way, then one combobox can do the work.
 

Users who are viewing this thread

Back
Top Bottom