View Full Version : Opening new form depending on data in current form


Jerry Dixon
12-06-2000, 11:51 PM
I need to set up a command button that will evaluate the content of a field in the current form and then open up the relevant subsequent form.
Any suggestions ?

Fornatian
12-07-2000, 04:50 AM
I would suggest:
1.Set the field you want to interogate as a combo box, therefore controlling selections.
2.Behind the command button use a select case statement suchas

Select Case Me.ComboBoxToLookAt

Case = "Form1"
docmd.openform "Form1"
Case = "Form2"
docmd.openform "Form2"
Case Else
'this is where you'd put a relevant error message or open a default form
docmd.openform "Form3"
End Select

Ian