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
|
|||
|
|||
Date range for report
Hi,
I tried to set up controls in a form in order to prompt for date criteria in a report. I added textboxes to the report, with references to the forms controls, in the controlsources for those boxes. When I try to run the report it doesn't prompt for the dates, it just puts #Name? where those controls are. If I open the form and enter the dates directly into the form and click ok it brings up the report with the proper filters though. Is there a way to make the report open the form to prompt for the dates, rather than having to open the form itself? |
#2
|
|||
|
|||
Date range for report
You can open the form using acDialog from the On Open event of the report. I
hate this method and have always recommended opening the form first and then open the report. -- Duane Hookom Microsoft Access MVP "Joey" wrote: Hi, I tried to set up controls in a form in order to prompt for date criteria in a report. I added textboxes to the report, with references to the forms controls, in the controlsources for those boxes. When I try to run the report it doesn't prompt for the dates, it just puts #Name? where those controls are. If I open the form and enter the dates directly into the form and click ok it brings up the report with the proper filters though. Is there a way to make the report open the form to prompt for the dates, rather than having to open the form itself? |
#3
|
|||
|
|||
Date range for report
i tried
DoCmd.OpenForm "frmWhatDates", , , , , acDialog it opens the form fine, but when I click the OK button it gets stuck and doesn't open the report. - maybe this is why you hate this method. How can I set this up so that is user friendly and the user doesn't have to open up the form? "Duane Hookom" wrote: You can open the form using acDialog from the On Open event of the report. I hate this method and have always recommended opening the form first and then open the report. -- Duane Hookom Microsoft Access MVP "Joey" wrote: Hi, I tried to set up controls in a form in order to prompt for date criteria in a report. I added textboxes to the report, with references to the forms controls, in the controlsources for those boxes. When I try to run the report it doesn't prompt for the dates, it just puts #Name? where those controls are. If I open the form and enter the dates directly into the form and click ok it brings up the report with the proper filters though. Is there a way to make the report open the form to prompt for the dates, rather than having to open the form itself? |
#4
|
|||
|
|||
Date range for report
Marting Green has some great stuff on how to do this at
http://www.fontstuff.com/access/index.htm. There are also examples of the open acdialog in northwind. It seems to me the user is going to need to do something anyway to open the form or report. I just prefer to have the form open and then the report. -- Duane Hookom Microsoft Access MVP "Joey" wrote: i tried DoCmd.OpenForm "frmWhatDates", , , , , acDialog it opens the form fine, but when I click the OK button it gets stuck and doesn't open the report. - maybe this is why you hate this method. How can I set this up so that is user friendly and the user doesn't have to open up the form? "Duane Hookom" wrote: You can open the form using acDialog from the On Open event of the report. I hate this method and have always recommended opening the form first and then open the report. -- Duane Hookom Microsoft Access MVP "Joey" wrote: Hi, I tried to set up controls in a form in order to prompt for date criteria in a report. I added textboxes to the report, with references to the forms controls, in the controlsources for those boxes. When I try to run the report it doesn't prompt for the dates, it just puts #Name? where those controls are. If I open the form and enter the dates directly into the form and click ok it brings up the report with the proper filters though. Is there a way to make the report open the form to prompt for the dates, rather than having to open the form itself? |
Thread Tools | |
Display Modes | |
|
|