Switch Between Forms - Combo Box?

ChrisDo11

Registered User.
Local time
Today, 10:47
Joined
Jan 21, 2003
Messages
69
I have 3 separate forms, in each form i would like to have a drop down box which will contain the names of the other two forms(and maybe the existing form as well).

When i'm in one form i would like to be able to switch to one of the other two forms by selecting it from a drop down box. Is this possible?

Thanks...
 
create a public sub that takes in the current form as a string and the value in the combobox as a string

On the AfterUpate() event call the sub sending the 2 arguments as you do it

your sub would pretty much just open the form with name that relates to the combobox and the one to close from the current name

Public Sub FormSwitch(ByVal strCurrentForm As String, ByVal strNewForm As String)

With DoCmd
.OpenForm strNewForm, acNormal
.Close acForm, strCurrentForm
End With

End Sub


and on the AfterUpdate of the combobox on each form something like this

Call FormSwitch(Me.Name, cboYourCombo)
 

Users who are viewing this thread

Back
Top Bottom