how do I open a form from a combo box (1 Viewer)

chewy

SuperNintendo Chalmers
Local time
Today, 22:54
Joined
Mar 8, 2002
Messages
581
I just want the user to choose which branch location from a combo box and have the shosen location open the corresponding form. Any ideas?
 

Rob.Mills

Registered User.
Local time
Today, 17:54
Joined
Aug 29, 2002
Messages
871
If the entries in the combobox are the same as the names of your forms...

In the AfterUpdate event of the combo box try this:

Dim strForm as string

strForm=Me!Combobox

docmd.openform strForm
 

Jack Cowley

Registered User.
Local time
Today, 22:54
Joined
Aug 7, 2000
Messages
2,639
You can do this with a Select Case statement but you do not give enough detail of what you want to do. You would, generally speaking, have one form that displayed many branches so you would open the form and display the data about that branch with code similar to this:

DoCmd.OpenForm "FormName", , , "[BranchID] = " & Me.BranchID

If you have a form for each branch then you might want to rethink your approach...

hth,
Jack
 

chewy

SuperNintendo Chalmers
Local time
Today, 22:54
Joined
Mar 8, 2002
Messages
581
im still designing it so any ideas would be great!
 

Users who are viewing this thread

Top Bottom