Hi Everyone,
I have this code on a login form. I wish to flag the username and group of all users and enter those values in a table whenever someone modifies something in the table through another form. I can't seem to be able to take the value of g_username and g_group and use them elsewhere in my database. I've tried refering to them simply by their variable names and also tried including the name of the form in front of the variable eg login_form.g_gr oup. I don't get errors I just don't get any results when I've tried inserting the value of g_username into a field in the table based on the before update event of the 2nd form (the one with the underlying table). I thought this was going to be a 10 minute job but I guess I was wrong. Any ideas would be appreciated. Thanks
Ramprat
The first two lines are in the declarations section at the top of the code on the login form.
Public g_username As String
Public g_group As String
Private Sub Login_Go_Button _Click()
Forms!login_for m.Refresh
g_username = Me.Username
g_group = Me.Group
Forms!Count_Sta tions_Form.Visi ble = True
End Sub
I have this code on a login form. I wish to flag the username and group of all users and enter those values in a table whenever someone modifies something in the table through another form. I can't seem to be able to take the value of g_username and g_group and use them elsewhere in my database. I've tried refering to them simply by their variable names and also tried including the name of the form in front of the variable eg login_form.g_gr oup. I don't get errors I just don't get any results when I've tried inserting the value of g_username into a field in the table based on the before update event of the 2nd form (the one with the underlying table). I thought this was going to be a 10 minute job but I guess I was wrong. Any ideas would be appreciated. Thanks
Ramprat
The first two lines are in the declarations section at the top of the code on the login form.
Public g_username As String
Public g_group As String
Private Sub Login_Go_Button _Click()
Forms!login_for m.Refresh
g_username = Me.Username
g_group = Me.Group
Forms!Count_Sta tions_Form.Visi ble = True
End Sub
Comment