My first post...I couldn't find help on this anywhere.
I have a search form which uses a simple filter to display records and then print a report based off of those records.
The user has requested to be able to click the Employee Name that is displayed (as a hyperlink) to generate a report based off of that employee.
Opening the report is no problem, but storing the Employee value from the form in order to open it has been troublesome.
Here's the code for the tbxName_Click() event:
It works just fine, but the problem is that no matter which employee name I click, it asks me to input a tbxName.Value, which tells me that it's not storing the value.
Anyone have any ideas?
I have a search form which uses a simple filter to display records and then print a report based off of those records.
The user has requested to be able to click the Employee Name that is displayed (as a hyperlink) to generate a report based off of that employee.
Opening the report is no problem, but storing the Employee value from the form in order to open it has been troublesome.
Here's the code for the tbxName_Click() event:
Private Sub tbxName_Click()
Dim strWhere As String
Dim lngLen As Long
strWhere = "" 'main filter
strWhere = "Trim(tbxName.Value) = Trim([Name])"
' print function
DoCmd.OpenReport "Search Results", acViewPreview, , strWhere
End Sub
It works just fine, but the problem is that no matter which employee name I click, it asks me to input a tbxName.Value, which tells me that it's not storing the value.
Anyone have any ideas?