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
|
|||
|
|||
Running Reports from User Options
I'm creating a form that has user options to generate a report. One text box
has Incoming, outgoing and TD options. The other box has Open, Closed, No Requirement, and All. I developed reports for whatever option the user chooses. Depending upon which options the user chooses determines what report is generated. So for instance if a user chooses Incoming and Open the user clicks on a button and the rprtInOpen report runs. How would I go about coding this? -- Message posted via http://www.accessmonster.com |
#2
|
|||
|
|||
Running Reports from User Options
Do all your reports have the same data source but just different
criteria? Based on your description, it sounds like they might. You can accomplish all of what you are doing with just one report. Your report has a Record Source in which you have set your criteria. Instead of using a specific value in the criteria, you can refer to your form for the values you need. The syntax for that is: Forms!YourFormName!YourTextBoxName Hope that helps! zat via AccessMonster.com wrote: I'm creating a form that has user options to generate a report. One text box has Incoming, outgoing and TD options. The other box has Open, Closed, No Requirement, and All. I developed reports for whatever option the user chooses. Depending upon which options the user chooses determines what report is generated. So for instance if a user chooses Incoming and Open the user clicks on a button and the rprtInOpen report runs. How would I go about coding this? -- Message posted via http://www.accessmonster.com |
#3
|
|||
|
|||
Running Reports from User Options
I am dealing with correspondences, so I have three different tables: CorresIn,
CorresOut, CorresTD (for Technical direction letters). The reports have different data source; therefore, I have different reports depending upon what the user selects from the form. Jeff L wrote: Do all your reports have the same data source but just different criteria? Based on your description, it sounds like they might. You can accomplish all of what you are doing with just one report. Your report has a Record Source in which you have set your criteria. Instead of using a specific value in the criteria, you can refer to your form for the values you need. The syntax for that is: Forms!YourFormName!YourTextBoxName Hope that helps! I'm creating a form that has user options to generate a report. One text box has Incoming, outgoing and TD options. The other box has Open, Closed, No [quoted text clipped - 3 lines] user clicks on a button and the rprtInOpen report runs. How would I go about coding this? -- Message posted via http://www.accessmonster.com |
#4
|
|||
|
|||
Running Reports from User Options
Sounds like you want to know what to put under the Print command button.
Using option groups and this sub should get you there Private Sub cmdPrint_Click() Select Case Me!optFirstChoice Case 1 'Incoming Select Case Me!optSecondChoice Case 1 'Open DoCmd.OpenReport "rptIncomingOpen", acViewPreview Case 2 'Closed DoCmd.OpenReport "rptIncomingClosed", acViewPreview Case 3 'No Requirement DoCmd.OpenReport "rptIncomingNoRequirement", acViewPreview End Select Case 2 'Outgoing Select Case Me!optSecondChoice Case 1 'Open DoCmd.OpenReport "rptOutgoingOpen", acViewPreview Case 2 'Closed DoCmd.OpenReport "rptOutgoingClosed", acViewPreview Case 3 'No Requirement DoCmd.OpenReport "rptOutgoingNoRequirement", acViewPreview End Select Case 3 'TD Select Case Me!optSecondChoice Case 1 'Open DoCmd.OpenReport "rptTDOpen", acViewPreview Case 2 'Closed DoCmd.OpenReport "rptTDClosed", acViewPreview Case 3 'No Requirement DoCmd.OpenReport "rptTDNoRequirement", acViewPreview End Select End Select End Sub "zat via AccessMonster.com" u24642@uwe wrote in message news:6444f6c7d9f5a@uwe... I am dealing with correspondences, so I have three different tables: CorresIn, CorresOut, CorresTD (for Technical direction letters). The reports have different data source; therefore, I have different reports depending upon what the user selects from the form. Jeff L wrote: Do all your reports have the same data source but just different criteria? Based on your description, it sounds like they might. You can accomplish all of what you are doing with just one report. Your report has a Record Source in which you have set your criteria. Instead of using a specific value in the criteria, you can refer to your form for the values you need. The syntax for that is: Forms!YourFormName!YourTextBoxName Hope that helps! I'm creating a form that has user options to generate a report. One text box has Incoming, outgoing and TD options. The other box has Open, Closed, No [quoted text clipped - 3 lines] user clicks on a button and the rprtInOpen report runs. How would I go about coding this? -- Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tools Options do not stick when user opens up Word | torajudo | General Discussion | 1 | January 18th, 2006 03:39 PM |
Printer Imaging Options keep changing when printing some reports | Gunew | General Discussion | 0 | November 23rd, 2005 03:18 PM |
Corrupt Windows Componenet, or Outlook Problem? | BPC23 com> | General Discussion | 0 | May 27th, 2005 06:08 PM |
Stopping report | albertsong | Using Forms | 23 | October 22nd, 2004 04:55 PM |
Winmail.dat, Outlook 2003, and Setting "Per User" Send Options | Rich | General Discussion | 3 | September 13th, 2004 08:57 PM |