onefootout
Technical User
Hi All,
I'm trying to open a report chosen from a combo box when the user clicks a button.
I have a table with 2 columns, the display name for a report, and the actual name.
I created a combo box with this info, set the column property for column 2 (actual report name) to 0, and made a button with the below onclick event. When I test it, I get an "Invalid use of Null" error. I can't figure out what I'm doing wrong here!
Thanks in advance for any help!
I'm trying to open a report chosen from a combo box when the user clicks a button.
I have a table with 2 columns, the display name for a report, and the actual name.
I created a combo box with this info, set the column property for column 2 (actual report name) to 0, and made a button with the below onclick event. When I test it, I get an "Invalid use of Null" error. I can't figure out what I'm doing wrong here!
Thanks in advance for any help!
Code:
Private Sub viewreport_Click()
Dim strDocName As String
Let strDocName = Me!pickrpt.Column(2)
DoCmd.OpenReport strDocName, acPreview
End Sub