Pop-up that print a report....

M

macdoum

Hello !

I Have a table with a ODBC link. I build a query and a report to get
the worker's schedules.

everything is working fine. The query looks up bewteen date to show the
results. A criteria «BETWEEN» is used in the query.

Is it possible to create a sort of pop-up window that would ask me
between what dates I would like the query to look for the worker's
scedule ?

What I would like is for the pop-up window to ask me between what dates
and when I would enter the two dates, the reports prints itself.


Can it be possible ?


Thanks...

Sorry abour my english, I'm french ! PLease don't hold that against me
!!!!!

Marc.
 
S

strive4peace

Hi Marc,

your English is fine ;)

use a form to collect the criteria for your query

ie:

formname --> ReportMenu

textboxes (or comboboxes):

Name --> Date1

Name --> Date2

then, in the criteria cell for your query:

Between DateValue([forms]![ReportMenu]![Date1]) And
DateValue([forms]![ReportMenu]![Date2])

then, you could have a command button to process the request

'~~~~~~~~~~~~~~~~~
if isnull(me.Date1) then
msgbox "You must specify a beginning date",,"Cannot show report"
exit sub
end if
if isnull(me.Date2) then
msgbox "You must specify an ending date",,"Cannot show report"
exit sub
end if

DoCmd.OpenQuery "queryname"
'~~~~~~~~~~~~~~~~~

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote programming and Training
strive4peace2006 at yahoo.com
*
 
S

strive4peace

Avec plasir, Marc ;) happy to help


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote programming and Training
strive4peace2006 at yahoo.com
*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top