Expand|Select|Wrap|Line Numbers
- Dim str Form As String
- If Me.ComboSelect.Value = "A" Then
- strForm = "AForm"
- ElseIf Me.ComboSelect.Value = "B" Then
- strForm = "BForm"
- ElseIf Me.ComboSelect.Value = "C" Then
- strForm = "CForm"
- ElseIf Me.ComboSelect.Value = "D" Then
- strForm = "DForm"
- End If
- DoCmd.OpenForm strForm
The problem I'm running into is the form has some text boxes where I would like the values to carry over to the appropriate form that opens.
Right now I have each form individually listed out like this:
Expand|Select|Wrap|Line Numbers
- If Me.ComboSelect.Value = "A" Then
- Forms!AForm.Text1.Value = Me.Text1.Value
- Forms!AForm.Text2.Value = Me.Text2.Value
- Forms!AForm.Text3.Value = Me.Text3.Value
- End If
Expand|Select|Wrap|Line Numbers
- DoCmd.OpenForm strForm
- Forms!strForm.Text1.Value = Me.Text1.Value
- Forms!strFormText2.Value = Me.Text2.Value
- Forms!strForm.Text3.Value = Me.Text3.Value