Combo Box help

DavidCantor

Registered User.
Local time
Today, 06:35
Joined
Oct 4, 2012
Messages
66
Can anyone help me?

I have three forms product, customer and order. in the order form I have a combo box.
I want the apropriate form to open based on the combobox selection. i.e. if customer is selected then the customer form should open and if the product is selected then the product table should open.

thanks
 
You could have a command button to open your form, which might have some code (On Click event) along the lines of;
Code:
Dim strDocName as String

[URL="http://www.techonthenet.com/access/functions/advanced/case.php"]Select Case[/URL] Me.YourComboName

Case "Customer"
     strDocName = "YourCustomerForm"

Case "Product"
     strDocName = "YourProductForm"

Case "Order"
     strDocName = "YourOrderForm

End Select

[URL="http://msdn.microsoft.com/en-us/library/office/ff820845.aspx"]DoCmd.OpenForm[/URL] strDocName
 
The code above may need to be adjusted according to how your Combo is set up. I have assumed your Combo is unbound and only has one column, that contains the string fields "Customer", "Product" and "Order"
 

Users who are viewing this thread

Back
Top Bottom