Hello, I received the following error when attempting to have the form populate only data created by users is a specific group. Below is my coding for your review. Your help is greatly appreciated and if my request is a bit unorthodox, this is my first post. Thanks again for patience and continued support:
Private Sub Form_Load()
Dim User As String
Dim mylogin As String
Dim Task As String
User = Environ("UserName")
mylogin = DLookup("HRELT", "tblUser", "UserLogin = '" & User & "'")
Task = "Select * from tblFieldsNames Where (Hiring_Owner = " & mylogin & ")"
Me.RecordSource = Task
The debugger highlighted the me.recordsource.
Private Sub Form_Load()
Dim User As String
Dim mylogin As String
Dim Task As String
User = Environ("UserName")
mylogin = DLookup("HRELT", "tblUser", "UserLogin = '" & User & "'")
Task = "Select * from tblFieldsNames Where (Hiring_Owner = " & mylogin & ")"
Me.RecordSource = Task
The debugger highlighted the me.recordsource.