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 |
#1
|
|||
|
|||
Report/Form need help
I am trying to open report and a form to enter parameters . This is what I
have - I keep getting error message. Can someone please tell me what I am doing wrong? Thank you. 'Use this if the source is on the main form Private Sub Report_Open(Cancel As Integer) Me.RecordSource = Forms![PCollector].Form.RecordSource With Forms![PCollector].Form If .OrderByOn Then Me.OrderBy = .OrderBy Me.OrderByOn = True End If If .FilterOn Then Me.Filter = .Filter Me.FilterOn = True End If End With End Sub |
#2
|
|||
|
|||
Report/Form need help
What is the error message? What line causes the error?
Is the record source of the form actually dynamic so that the record source of the report needs to be dynamic? Have you tried commenting out every line setting a property and then uncommenting them one at a time to see where the code breaks? -- Duane Hookom Microsoft Access MVP If I have helped you, please help me by donating to UCP http://www.access.hookom.net/UCP/Default.htm "TotallyConfused" wrote: I am trying to open report and a form to enter parameters . This is what I have - I keep getting error message. Can someone please tell me what I am doing wrong? Thank you. 'Use this if the source is on the main form Private Sub Report_Open(Cancel As Integer) Me.RecordSource = Forms![PCollector].Form.RecordSource With Forms![PCollector].Form If .OrderByOn Then Me.OrderBy = .OrderBy Me.OrderByOn = True End If If .FilterOn Then Me.Filter = .Filter Me.FilterOn = True End If End With End Sub |
Thread Tools | |
Display Modes | |
|
|