If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
criteria
On Fri, 27 Feb 2009 08:11:25 -0800, Christina
wrote: Hi, I got to create the botton without the wizard. When I run the report it gives me Compile error Invalid Outside procedure. That suggests that you have some sort of code that is NOT between a Private / Public Sub subname... End Sub or Private / Public Function functionname... End Function Either a Sub for a Function is a type of Procedure, and most code (except for global variable definitions or Option settings) needs to be between those lines. If you need help figuring out what you have that's misplaced please open the Module, type Ctrl-A to select it ALL, and paste it to a message here. -- John W. Vinson [MVP] |
#12
|
|||
|
|||
criteria
"John W. Vinson" wrote: On Fri, 27 Feb 2009 08:11:25 -0800, Christina wrote: Hi, I got to create the botton without the wizard. When I run the report it gives me Compile error Invalid Outside procedure. That suggests that you have some sort of code that is NOT between a Private / Public Sub subname... End Sub or Private / Public Function functionname... End Function Either a Sub for a Function is a type of Procedure, and most code (except for global variable definitions or Option settings) needs to be between those lines. If you need help figuring out what you have that's misplaced please open the Module, type Ctrl-A to select it ALL, and paste it to a message here. -- John W. Vinson [MVP] |
#13
|
|||
|
|||
criteria
This is for the command button
Option Compare Database Private Sub BtnRptMonthlyReturnes_Click() On Error GoTo Err_BtnRptMonthlyReturnes_Click Dim stDocName As String stDocName = "MONTHLY RETURNS" DoCmd.OpenReport stDocName, acPreview Exit_BtnRptMonthlyReturnes_Click: Exit Sub Err_BtnRptMonthlyReturnes_Click: MsgBox Err.Description Resume Exit_BtnRptMonthlyReturnes_Click End Sub Private Sub Reconciliation_Report_Click() On Error GoTo Err_Reconciliation_Report_Click Dim stDocName As String stDocName = "Reconciliation" DoCmd.OpenReport stDocName, acPreview Exit_Reconciliation_Report_Click: Exit Sub Err_Reconciliation_Report_Click: MsgBox Err.Description Resume Exit_Reconciliation_Report_Click End Sub Private Sub Command18_Click() On Error GoTo Err_Command18_Click Screen.PreviousControl.SetFocus DoCmd.FindNext Exit_Command18_Click: Exit Sub Err_Command18_Click: MsgBox Err.Description Resume Exit_Command18_Click End Sub Private Sub Reconciliation_Click() DoCmd.OpenReport "Reconciliation", acViewPreview Me.Visible = False End Sub Private Sub Command20_Click() On Error GoTo Err_Command20_Click Dim stDocName As String stDocName = "Uncashed Checks" DoCmd.OpenQuery stDocName, acNormal, acEdit Exit_Command20_Click: Exit Sub Err_Command20_Click: MsgBox Err.Description Resume Exit_Command20_Click End Sub Private Sub Command21_Click() DoCmd.OpenReport "Reconciliation", acViewPreview Me.Visible = False Exit_Command21_Click: Exit Sub Err_Command21_Click: MsgBox Err.Description Resume Exit_Command21_Click End Sub Private Sub Command22_Click() On Error GoTo Err_Command22_Click Dim stDocName As String stDocName = "Uncashed Total" DoCmd.OpenQuery stDocName, acNormal, acEdit Exit_Command22_Click: Exit Sub Err_Command22_Click: MsgBox Err.Description Resume Exit_Command22_Click End Sub This is the one for the report Private Sub Report_Close() End Sub "John W. Vinson" wrote: On Fri, 27 Feb 2009 08:11:25 -0800, Christina wrote: Hi, I got to create the botton without the wizard. When I run the report it gives me Compile error Invalid Outside procedure. That suggests that you have some sort of code that is NOT between a Private / Public Sub subname... End Sub or Private / Public Function functionname... End Function Either a Sub for a Function is a type of Procedure, and most code (except for global variable definitions or Option settings) needs to be between those lines. If you need help figuring out what you have that's misplaced please open the Module, type Ctrl-A to select it ALL, and paste it to a message here. -- John W. Vinson [MVP] |
#14
|
|||
|
|||
criteria
On Mon, 2 Mar 2009 07:49:04 -0800, Christina
wrote: This is the one for the report Private Sub Report_Close() End Sub "John W. Vinson" wrote: Well, since that sub does absolutely nothing, I'd say just delete it. Just to clarify: under what circumstances do you get the error message? Only when you open the report from the command button? What happens if you open the report from the database Reports window? If you type Ctrl-G to open the VBA editor and select Debug... Compile my project, do you get any error messages? If so, what line is highlighted? -- John W. Vinson [MVP] |
#15
|
|||
|
|||
criteria
Ok, please let's start again. Right now when I run the report either from
the button or directly from the reports, the report is blank. This is the code I put in the code builder next to the Event procedure. Hope I did that right, as I never did it before. Private Sub Command24_Click() DoCmd.OpenReport "Reconciliation", acViewPreview Me.Visible = False End Sub When I press CtrG...Compile Db1, codes show up, but nothing highlighted. This is the criteria in the quer Between [Forms]![ParamForm]![StartDate] And [Forms]![ParamForm]![EndDate] "John W. Vinson" wrote: On Mon, 2 Mar 2009 07:49:04 -0800, Christina wrote: This is the one for the report Private Sub Report_Close() End Sub "John W. Vinson" wrote: Well, since that sub does absolutely nothing, I'd say just delete it. Just to clarify: under what circumstances do you get the error message? Only when you open the report from the command button? What happens if you open the report from the database Reports window? If you type Ctrl-G to open the VBA editor and select Debug... Compile my project, do you get any error messages? If so, what line is highlighted? -- John W. Vinson [MVP] |
#16
|
|||
|
|||
criteria
On Tue, 3 Mar 2009 09:57:08 -0800, Christina
wrote: Ok, please let's start again. Right now when I run the report either from the button or directly from the reports, the report is blank. This is the code I put in the code builder next to the Event procedure. Hope I did that right, as I never did it before. Private Sub Command24_Click() DoCmd.OpenReport "Reconciliation", acViewPreview Me.Visible = False End Sub When I press CtrG...Compile Db1, codes show up, but nothing highlighted. This is the criteria in the quer Between [Forms]![ParamForm]![StartDate] And [Forms]![ParamForm]![EndDate] ParamForm is open at the time you click the button, I hope? What's in StartDate and EndDate? What's in the table? Perhaps you could post the complete SQL view of the report's recordsource query. -- John W. Vinson [MVP] |
#17
|
|||
|
|||
criteria
Hi, I have been at this thing for so long and still cant get it. Would you
agree for me to send you the db. I so want to finish this project. It is 1256 KB. All my queries and reports are set.... PLEASE Thanks "Christina" wrote: Ok, please let's start again. Right now when I run the report either from the button or directly from the reports, the report is blank. This is the code I put in the code builder next to the Event procedure. Hope I did that right, as I never did it before. Private Sub Command24_Click() DoCmd.OpenReport "Reconciliation", acViewPreview Me.Visible = False End Sub When I press CtrG...Compile Db1, codes show up, but nothing highlighted. This is the criteria in the quer Between [Forms]![ParamForm]![StartDate] And [Forms]![ParamForm]![EndDate] "John W. Vinson" wrote: On Mon, 2 Mar 2009 07:49:04 -0800, Christina wrote: This is the one for the report Private Sub Report_Close() End Sub "John W. Vinson" wrote: Well, since that sub does absolutely nothing, I'd say just delete it. Just to clarify: under what circumstances do you get the error message? Only when you open the report from the command button? What happens if you open the report from the database Reports window? If you type Ctrl-G to open the VBA editor and select Debug... Compile my project, do you get any error messages? If so, what line is highlighted? -- John W. Vinson [MVP] |
#18
|
|||
|
|||
criteria
On Tue, 3 Mar 2009 15:15:02 -0800, Christina
wrote: Hi, I have been at this thing for so long and still cant get it. Would you agree for me to send you the db. I so want to finish this project. It is 1256 KB. All my queries and reports are set.... Well... ordinarily I would only do so with a consulting contract, but it sounds like just some simple thing that we're just not getting communicated! Make a copy of the database. Delete any confidential data if any (I won't spread it around but doesn't hurt to be safe); use Tools... Database Utilities... Compact and Repair to shrink it down and clean it out. Then zip it (right click the file in Windows Explorer and choose Send To... Compressed (zipped) Folder. Email the zipped file to jvinson at wysard of info dot com - edit out the blanks and the obvious punctuation. It would help me a lot if you would clearly describe just what you're trying to accomplish and what specific problems you're having. Sure, you've done so again and again but it gets hard to pull all the bits and pieces together. -- John W. Vinson [MVP] |
|
Thread Tools | |
Display Modes | |
|
|