I'm looking for a method for which I can update a table using VB when my form loads. The reason for this is I want the table to be updated the second the user loads the form, so I don't want to use the method of assigning data to a text box and then associating that text box with the necessary table field. The code I have in there now assigns the user name (data I need to be appended to this other table) to an unbound text box.
Code:
Private Sub Form_Load()
Dim Div As String, OrgID As String, Nam As String, RV As String, LogonName As String, UserGroup As String
DoCmd.Maximize
Ans = FindLogonUserParms(OrgID, RV, LogonName, UserGroup)
gblUserIDSelected = RV
gblDivSelected = Div
gblUsersLogonName = LogonName
gblOrgSelected = OrgID
gblUserGroup = UserGroup
Me!RV = gblUserIDSelected
'Me!Div = gblDivSelected
'Me!DivisionName = gblDivSelected & " Division"
Me!UsersLogonName = gblUsersLogonName
Me!OrgID = gblOrgSelected
Me!UserGroup = gblUserGroup
End Sub
I want to take "RV" and append it to a table called tblUserTrack and the FieldName is UserID.