Trying to get Current User info only

E

Emma

Hi I have a form which I would like only the Current User() information to
show up on I'm using the following code on the button:

Private Sub Reminders_Click()
On Error GoTo Err_Reminders_Click

Dim stDocName As String
Dim stLinkCriteria As String

DoCmd.RunCommand acCmdSaveRecord

stDocName = "Reminder Form"
stLinkCriteria = "[Worker]=" & CurrentUser()
DoCmd.OpenForm stDocName, , , stLinkCriteria


Exit_Reminders_Click:
Exit Sub

Err_Reminders_Click:
MsgBox Err.Description
Resume Exit_Reminders_Click

End Sub

But I'm getting a syntax error (missing operator) in query expression
'[Worker] = Gertrude'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top