First off, I'm a clueless newbie when it comes to VBA. I'm posting this on behalf of a frustrated coworker.
Coworker has a form dropdown list with the names of employees and their organization.
When someone selects an employee name (concatenated with their organization name) from the list, it appears on a textbox in the same form (see picture1).
The employee name that has been selected should then populate a table called table_Router1.
Instead, it brings up a 424 error (see picture2).
How do we correct this? Thanks!
Here is the code, with the error highlighted:
Private Sub Combo7_Click()
nam$ = Me!Combo7.Column(0) & ", " & Me!Combo7.Column(1)
Debug.Print nam$
Me!txtHolder1 = nam$
DoCmd.GoToRecord , "table_Router1", acGoTo, 1
'Update table_router1
Table![table_Router1]!NameNorg = Me!txtHolder1
'Me!txtHolder1
End Sub
Private Sub Form_Open(Cancel As Integer)
DoCmd.OpenTable "table_Router1"
DoCmd.GoToRecord , "table_router1", acFirst
End Sub
Coworker has a form dropdown list with the names of employees and their organization.
When someone selects an employee name (concatenated with their organization name) from the list, it appears on a textbox in the same form (see picture1).
The employee name that has been selected should then populate a table called table_Router1.
Instead, it brings up a 424 error (see picture2).
How do we correct this? Thanks!
Here is the code, with the error highlighted:
Private Sub Combo7_Click()
nam$ = Me!Combo7.Column(0) & ", " & Me!Combo7.Column(1)
Debug.Print nam$
Me!txtHolder1 = nam$
DoCmd.GoToRecord , "table_Router1", acGoTo, 1
'Update table_router1
Table![table_Router1]!NameNorg = Me!txtHolder1
'Me!txtHolder1
End Sub
Private Sub Form_Open(Cancel As Integer)
DoCmd.OpenTable "table_Router1"
DoCmd.GoToRecord , "table_router1", acFirst
End Sub