murray83
Games Collector
- Local time
- Today, 16:17
- Joined
- Mar 31, 2017
- Messages
- 827
Afternoon folks
trying to change how some buttons are shown/hidden. at the moment they are shown based on the PC logon based on the Environ("username")
so its hard coded which i guess not the best way o do it as when need to add someone new to the list need to access the code and then add them on the end of this
So thought about a table which would hold the login details for people who have access and also for people who may need it then use dlookup to see if the txtusername value matches to the table but hit an error, run time error '2428':
"You entered an invalid argument in a domain aggregate function"
this is my dllookup code
not sure but think i may be missing some punctuation but all help much appreciated
cheers
trying to change how some buttons are shown/hidden. at the moment they are shown based on the PC logon based on the Environ("username")
so its hard coded which i guess not the best way o do it as when need to add someone new to the list need to access the code and then add them on the end of this
Code:
If Me.txtusername.Value =
Me.cmdSYS.Visible = True
Me.cmdClose2.Visible = True
Else
Me.cmdSYS.Visible = False
Me.cmdExit.Visible = False
End If
End Sub
So thought about a table which would hold the login details for people who have access and also for people who may need it then use dlookup to see if the txtusername value matches to the table but hit an error, run time error '2428':
"You entered an invalid argument in a domain aggregate function"
this is my dllookup code
Code:
If txtusername = DLookup(PCLogin, tblSYSManger)
not sure but think i may be missing some punctuation but all help much appreciated
cheers