G
Guest
Good Morning,
I am trying to pass information between 2 forms. Basically if one of
the fields equals a specific answer the another form will open and
autopopulate with values from certain fields. Here is what I have so far and
everything works until it is time to change the name of the most recently
opened form. Also you will see a nested if statement, I could not get an or
statement to work if you can help with that as well I would greatly
appreciate it.
Private Sub Command26_Click()
Dim v_name As String
Dim v_ticket As Long
If [Voice Order Type] = 1 Then
GoTo Run
Else
If [Voice Order Type] = 6 Then
GoTo Run
Else
GoTo Continue
End If
End If
Run:
v_name = DLookup("[Name]", "tbl_usernames", "[UserID] = UserNAme")
v_ticket = [Ticket #]
Text27 = v_name
DoCmd.OpenForm "MAC_LIST", , , , acFormAdd
Name = Forms("tbl_ticket_tracking").v_name 'This is where the
error is
[Ticket #] = v_ticket
Continue:
End Sub
I am trying to pass information between 2 forms. Basically if one of
the fields equals a specific answer the another form will open and
autopopulate with values from certain fields. Here is what I have so far and
everything works until it is time to change the name of the most recently
opened form. Also you will see a nested if statement, I could not get an or
statement to work if you can help with that as well I would greatly
appreciate it.
Private Sub Command26_Click()
Dim v_name As String
Dim v_ticket As Long
If [Voice Order Type] = 1 Then
GoTo Run
Else
If [Voice Order Type] = 6 Then
GoTo Run
Else
GoTo Continue
End If
End If
Run:
v_name = DLookup("[Name]", "tbl_usernames", "[UserID] = UserNAme")
v_ticket = [Ticket #]
Text27 = v_name
DoCmd.OpenForm "MAC_LIST", , , , acFormAdd
Name = Forms("tbl_ticket_tracking").v_name 'This is where the
error is
[Ticket #] = v_ticket
Continue:
End Sub