I have these code statements that only look at the first record in a form: I need them to look at all of the records.
Dim tempuser as String
Docmd.OpenForm "subLock", acNormal,,acFormReadOnly, acHidden
Docmd.GoToRecord acDataForm, "subLock", acGoTo, 1
tempuser = Forms!subLock!Locker
Docmd.Close acForm, "subLock", acSaveNo
If fOSUserName = tempuser then
Me!AddPub.Visible = True
Else
Me.AddPub.Visible = False
End If
I just want this sub to look through all names that are in the form instead of just at the first, as it is doing now.
Any help would be greatly appreciated.
Thanks
Brian
Dim tempuser as String
Docmd.OpenForm "subLock", acNormal,,acFormReadOnly, acHidden
Docmd.GoToRecord acDataForm, "subLock", acGoTo, 1
tempuser = Forms!subLock!Locker
Docmd.Close acForm, "subLock", acSaveNo
If fOSUserName = tempuser then
Me!AddPub.Visible = True
Else
Me.AddPub.Visible = False
End If
I just want this sub to look through all names that are in the form instead of just at the first, as it is doing now.
Any help would be greatly appreciated.
Thanks
Brian