bgibsonIYD
Technical User
I have a form called "Report List". The form has 3 tabs, and on each tab is an unbound list box. I have filled the list boxes RowSource with the following code:
SELECT Right([name],Len([Name])-3) AS NameWithoutList, [msysobjects].[Name] FROM msysobjects WHERE ((([msysobjects].[Type])=-32764) And ((Left([name],3))="pre"
) ORDER BY [msysobjects].[Name];
(the 3 letters pertain to each list boxes criteria)
I have also set a Double Click event on each list box with the following code:
Private Sub List6_DblClick(Cancel As Integer)
Dim rptName As String
rptName = Me.PreReg.[Column](1)
DoCmd.OpenReport rptName, acViewPreview
End Sub
Now, I have another database that is quite similar (for a previous year) and this code works. The only thing's that changed were the titles of the tabs and the reports. I am now getting the an error message when I double click on one of the reports in the box:
run-time error '450': Wrong number of arguments or invalid property assignment.
Can anyone help with this? Why am I receiving an error message and how can I fix it?
Beth
**Learning Access**
SELECT Right([name],Len([Name])-3) AS NameWithoutList, [msysobjects].[Name] FROM msysobjects WHERE ((([msysobjects].[Type])=-32764) And ((Left([name],3))="pre"
(the 3 letters pertain to each list boxes criteria)
I have also set a Double Click event on each list box with the following code:
Private Sub List6_DblClick(Cancel As Integer)
Dim rptName As String
rptName = Me.PreReg.[Column](1)
DoCmd.OpenReport rptName, acViewPreview
End Sub
Now, I have another database that is quite similar (for a previous year) and this code works. The only thing's that changed were the titles of the tabs and the reports. I am now getting the an error message when I double click on one of the reports in the box:
run-time error '450': Wrong number of arguments or invalid property assignment.
Can anyone help with this? Why am I receiving an error message and how can I fix it?
Beth
**Learning Access**