![]() |
|
|
#1
|
|||
|
|||
|
Hi, i have previously done this in earlier versions of Access and it has worked fine but now i am using Access 2007 it doesnt work
This is what i am trying to do. Create a report and in the underlying query one of the fields relates to a dialog box. Previously i have put in code in the report properties 'on open' and 'on close' to load up the dialog box. The code i am using is shown below but it now errors saying 'illegal function' '------------------------------------------------------------ ' Report_Open ' '------------------------------------------------------------ Private Sub Report_Open(Cancel As Integer) On Error GoTo Report_Open_Err ' open form DoCmd.OpenForm "dialogbox", acNormal, "", "", acEdit, acDialog If (Not IsLoaded("dialogbox")) Then DoCmd.CancelEvent End If Report_Open_Exit: Exit Sub Report_Open_Err: MsgBox Error$ Resume Report_Open_Exit End Sub '------------------------------------------------------------ ' Report_Close ' '------------------------------------------------------------ Private Sub Report_Close() On Error GoTo Report_Close_Err ' close form DoCmd.Close acForm, "dialogbox" Report_Close_Exit: Exit Sub Report_Close_Err: MsgBox Error$ Resume Report_Close_Exit End Sub Please can you help me fix the code so it works in Access 2007 Many thanks Jane |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sub-report backcolor matching alternating row color in main report | postman | Reports | 0 | 10-24-2008 09:20 AM |
| Access 2002 Front-End Inconsistent Errors | janetb | Security | 1 | 07-28-2008 10:17 AM |
| Does not show ODBC Data Source Administrator dialog. | ChanChanko | Access | 0 | 08-30-2006 12:50 AM |
| Errors when they prepare their reports at the same time | admaldo | Reports | 11 | 03-16-2006 09:28 AM |
| Errors when they generate their reports at the same | admaldo | Security | 1 | 03-11-2006 04:38 AM |