Good morning. I have a client form called "frmClientEntry" that I am creating a button on called "btnMonthlyReport" . I have created a report called "rptEquipClaimForm" . The query and report work fine, except that it lists all clients. What I want is a way to be able to easily select which user I am looking to get their monthly report for. I need to create a select user field, which I thought if I was already on their Client form then I could just use their autonumber clientid and pass criteria. but then ill also need to choose the date range for this report.....
Any idea a good way to go about this? I am completely stumped over here.
I was trying this as a starter point to see if I could even get to the report with every transaction date but this code wont work:
Code:
On Error GoTo Err_btnOpenFile_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "rptEquipClaimForm"
stLinkCriteria = "[clientDBID]=" & "'" & Me![clientDBID] & "'"
DoCmd.OpenReport stDocName, acViewReport, , stLinkCriteria, acDialog
Exit_btnOpenFile_Click:
Exit Sub
Err_btnOpenFile_Click:
MsgBox Err.Description
Resume Exit_btnOpenFile_Click
I get type mismatch, I think its because it was copied from a text field not a number, but I don't know the proper fix for the stLinkCriteria.
Any help would be great, thanks!