I am trying to open a report filtered by the current user. But I'm getting an error saying the d/b can't find the table or it is misspelled. It is spelled correctly. Do I have a syntax issue with this code...
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
dim strAgent as string
strAgent=Dlookup("CurrentU
debug.print strAgent
DoCmd.OpenReport "rptReferrals", acViewPreview, , "[Agent] ="" & strAgent & "'"
or this
DoCmd.OpenReport "rptReferrals", acViewPreview, , "[Agent] = '" & DLookup("[CurrentUser]", "LOCALtblCurrentUser") & "'" acWindowNormal