Going from dialog boxes to form for between dates

G

Guest

I have a report that draws from a query I need the report to report from date
to date. At this time, I have parameters set in the query, between [Start
Date] and [End Dates], which gives me a dialog boxes. I have created a form
with both start and end dates txt boxes, calendars and a command button. By
problem is how to get the dates enter from the calendar in the txt boxes to
call the report, with the start and end dates as a parameters. As of now each
user has two different dialog boxes and no calendar, I see a problem coming.
There no way to make changes to the dialog boxes generated, I suppose? Thanks
for any help on this problem
 
D

Douglas J. Steele

Change the parameters in your query from [Start Date] and [End Date] to
Forms!NameOfForm!NameOfControl

Note that the form must be open when the query is run: the query will not
open the form for you.
 
G

Guest

I've changed parameters in the query to Forms!frmReport2007!NameOfControl and
the command button will launch the report on click button, but with out the
dates or values in the txt boxes that have been populated by the calendar. I
also like the form to close after launching the report. Can this be done?

Thanks again

Douglas J. Steele said:
Change the parameters in your query from [Start Date] and [End Date] to
Forms!NameOfForm!NameOfControl

Note that the form must be open when the query is run: the query will not
open the form for you.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


rap43 said:
I have a report that draws from a query I need the report to report from
date
to date. At this time, I have parameters set in the query, between [Start
Date] and [End Dates], which gives me a dialog boxes. I have created a
form
with both start and end dates txt boxes, calendars and a command button.
By
problem is how to get the dates enter from the calendar in the txt boxes
to
call the report, with the start and end dates as a parameters. As of now
each
user has two different dialog boxes and no calendar, I see a problem
coming.
There no way to make changes to the dialog boxes generated, I suppose?
Thanks
for any help on this problem
 
D

Douglas J. Steele

Did you actually put NameOfControl? You need to put the actual name of the
control (just as you changed "NameOfForm" to "frmReport2007")

While frmReport2007 is open (and populated with dates), go to the Immediate
Window (Ctrl-G), type the following into the bottom:

?Forms!frmReport2007!NameOfControl

and hit Enter (remember, you're not really using NameOfControl!). Does
what's on the form appear in the window?

If so, are you sure you're using the correct query as the recordsource for
the report?

To close the form after opening the report, try putting DoCmd.Close in the
module after DoCmd.OpenReport.



--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


rap43 said:
I've changed parameters in the query to Forms!frmReport2007!NameOfControl
and
the command button will launch the report on click button, but with out
the
dates or values in the txt boxes that have been populated by the calendar.
I
also like the form to close after launching the report. Can this be done?

Thanks again

Douglas J. Steele said:
Change the parameters in your query from [Start Date] and [End Date] to
Forms!NameOfForm!NameOfControl

Note that the form must be open when the query is run: the query will not
open the form for you.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


rap43 said:
I have a report that draws from a query I need the report to report from
date
to date. At this time, I have parameters set in the query, between
[Start
Date] and [End Dates], which gives me a dialog boxes. I have created a
form
with both start and end dates txt boxes, calendars and a command
button.
By
problem is how to get the dates enter from the calendar in the txt
boxes
to
call the report, with the start and end dates as a parameters. As of
now
each
user has two different dialog boxes and no calendar, I see a problem
coming.
There no way to make changes to the dialog boxes generated, I suppose?
Thanks
for any help on this problem
 
G

Guest

I had changed both name in the query. I launch the form and populated with
dates pressed Ctrl-G and inserted ?Forms!frmReport2007!command8 in the go to
the Immediate Window and pressed enter. Error run time 483 object doesn't
support this porperty or method.
In my query I have [Forms]![frmReport2007]![Command8]. The command button in
the form will launch the report with out data. Does the button properties
need something other than
Private Sub Command8_Click()
On Error GoTo Err_Command8_Click
Dim stDocName As String
stDocName = "Date_Qry"
DoCmd.OpenReport stDocName, acPreview
Exit_Command8_Click:
Exit Sub
Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click
End Sub

Thanks for your time.

Douglas J. Steele said:
Did you actually put NameOfControl? You need to put the actual name of the
control (just as you changed "NameOfForm" to "frmReport2007")

While frmReport2007 is open (and populated with dates), go to the Immediate
Window (Ctrl-G), type the following into the bottom:

?Forms!frmReport2007!NameOfControl

and hit Enter (remember, you're not really using NameOfControl!). Does
what's on the form appear in the window?

If so, are you sure you're using the correct query as the recordsource for
the report?

To close the form after opening the report, try putting DoCmd.Close in the
module after DoCmd.OpenReport.



--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


rap43 said:
I've changed parameters in the query to Forms!frmReport2007!NameOfControl
and
the command button will launch the report on click button, but with out
the
dates or values in the txt boxes that have been populated by the calendar.
I
also like the form to close after launching the report. Can this be done?

Thanks again

Douglas J. Steele said:
Change the parameters in your query from [Start Date] and [End Date] to
Forms!NameOfForm!NameOfControl

Note that the form must be open when the query is run: the query will not
open the form for you.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I have a report that draws from a query I need the report to report from
date
to date. At this time, I have parameters set in the query, between
[Start
Date] and [End Dates], which gives me a dialog boxes. I have created a
form
with both start and end dates txt boxes, calendars and a command
button.
By
problem is how to get the dates enter from the calendar in the txt
boxes
to
call the report, with the start and end dates as a parameters. As of
now
each
user has two different dialog boxes and no calendar, I see a problem
coming.
There no way to make changes to the dialog boxes generated, I suppose?
Thanks
for any help on this problem
 
D

Douglas J. Steele

The control names you need in Forms!frmReport2007!NameOfControl are the
controls that hold the date values, not the name of the command button.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


rap43 said:
I had changed both name in the query. I launch the form and populated with
dates pressed Ctrl-G and inserted ?Forms!frmReport2007!command8 in the go
to
the Immediate Window and pressed enter. Error run time 483 object doesn't
support this porperty or method.
In my query I have [Forms]![frmReport2007]![Command8]. The command button
in
the form will launch the report with out data. Does the button properties
need something other than
Private Sub Command8_Click()
On Error GoTo Err_Command8_Click
Dim stDocName As String
stDocName = "Date_Qry"
DoCmd.OpenReport stDocName, acPreview
Exit_Command8_Click:
Exit Sub
Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click
End Sub

Thanks for your time.

Douglas J. Steele said:
Did you actually put NameOfControl? You need to put the actual name of
the
control (just as you changed "NameOfForm" to "frmReport2007")

While frmReport2007 is open (and populated with dates), go to the
Immediate
Window (Ctrl-G), type the following into the bottom:

?Forms!frmReport2007!NameOfControl

and hit Enter (remember, you're not really using NameOfControl!). Does
what's on the form appear in the window?

If so, are you sure you're using the correct query as the recordsource
for
the report?

To close the form after opening the report, try putting DoCmd.Close in
the
module after DoCmd.OpenReport.



--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


rap43 said:
I've changed parameters in the query to
Forms!frmReport2007!NameOfControl
and
the command button will launch the report on click button, but with out
the
dates or values in the txt boxes that have been populated by the
calendar.
I
also like the form to close after launching the report. Can this be
done?

Thanks again

:

Change the parameters in your query from [Start Date] and [End Date]
to
Forms!NameOfForm!NameOfControl

Note that the form must be open when the query is run: the query will
not
open the form for you.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I have a report that draws from a query I need the report to report
from
date
to date. At this time, I have parameters set in the query, between
[Start
Date] and [End Dates], which gives me a dialog boxes. I have created
a
form
with both start and end dates txt boxes, calendars and a command
button.
By
problem is how to get the dates enter from the calendar in the txt
boxes
to
call the report, with the start and end dates as a parameters. As of
now
each
user has two different dialog boxes and no calendar, I see a problem
coming.
There no way to make changes to the dialog boxes generated, I
suppose?
Thanks
for any help on this problem
 
G

Guest

With ?Forms!frmReport2007!txtStartDate!txtEndDate in the Immediate
Window (Ctrl-G) and Forms!frmReport2007!txtStartDate!txtEndDate in the
query. I am getting error Property let procedure not defined and property get
procedure did not return an object. Do I need to set properties in the txt
boxes that will be populated by the calendar.



Douglas J. Steele said:
The control names you need in Forms!frmReport2007!NameOfControl are the
controls that hold the date values, not the name of the command button.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


rap43 said:
I had changed both name in the query. I launch the form and populated with
dates pressed Ctrl-G and inserted ?Forms!frmReport2007!command8 in the go
to
the Immediate Window and pressed enter. Error run time 483 object doesn't
support this porperty or method.
In my query I have [Forms]![frmReport2007]![Command8]. The command button
in
the form will launch the report with out data. Does the button properties
need something other than
Private Sub Command8_Click()
On Error GoTo Err_Command8_Click
Dim stDocName As String
stDocName = "Date_Qry"
DoCmd.OpenReport stDocName, acPreview
Exit_Command8_Click:
Exit Sub
Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click
End Sub

Thanks for your time.

Douglas J. Steele said:
Did you actually put NameOfControl? You need to put the actual name of
the
control (just as you changed "NameOfForm" to "frmReport2007")

While frmReport2007 is open (and populated with dates), go to the
Immediate
Window (Ctrl-G), type the following into the bottom:

?Forms!frmReport2007!NameOfControl

and hit Enter (remember, you're not really using NameOfControl!). Does
what's on the form appear in the window?

If so, are you sure you're using the correct query as the recordsource
for
the report?

To close the form after opening the report, try putting DoCmd.Close in
the
module after DoCmd.OpenReport.



--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I've changed parameters in the query to
Forms!frmReport2007!NameOfControl
and
the command button will launch the report on click button, but with out
the
dates or values in the txt boxes that have been populated by the
calendar.
I
also like the form to close after launching the report. Can this be
done?

Thanks again

:

Change the parameters in your query from [Start Date] and [End Date]
to
Forms!NameOfForm!NameOfControl

Note that the form must be open when the query is run: the query will
not
open the form for you.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I have a report that draws from a query I need the report to report
from
date
to date. At this time, I have parameters set in the query, between
[Start
Date] and [End Dates], which gives me a dialog boxes. I have created
a
form
with both start and end dates txt boxes, calendars and a command
button.
By
problem is how to get the dates enter from the calendar in the txt
boxes
to
call the report, with the start and end dates as a parameters. As of
now
each
user has two different dialog boxes and no calendar, I see a problem
coming.
There no way to make changes to the dialog boxes generated, I
suppose?
Thanks
for any help on this problem
 
D

Douglas J. Steele

Forms!frmReport2007!txtStartDate!txtEndDate isn't a valid reference. You
have two fields, so they need to be referred to separately as
Forms!frmReport2007!txtStartDate and Forms!frmReport2007!txtEndDate

Where you used to have [Start Date] as a parameter, use
Forms!frmReport2007!txtStartDate

Where you used to have [End Date] as a parameter, use
Forms!frmReport2007!txtEndDate

However, do you have 2 calendar controls on the form? Refer to them rather
than the two text boxes.


My apologies for not being more specific.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


rap43 said:
With ?Forms!frmReport2007!txtStartDate!txtEndDate in the Immediate
Window (Ctrl-G) and Forms!frmReport2007!txtStartDate!txtEndDate in the
query. I am getting error Property let procedure not defined and property
get
procedure did not return an object. Do I need to set properties in the txt
boxes that will be populated by the calendar.



Douglas J. Steele said:
The control names you need in Forms!frmReport2007!NameOfControl are the
controls that hold the date values, not the name of the command button.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


rap43 said:
I had changed both name in the query. I launch the form and populated
with
dates pressed Ctrl-G and inserted ?Forms!frmReport2007!command8 in the
go
to
the Immediate Window and pressed enter. Error run time 483 object
doesn't
support this porperty or method.
In my query I have [Forms]![frmReport2007]![Command8]. The command
button
in
the form will launch the report with out data. Does the button
properties
need something other than
Private Sub Command8_Click()
On Error GoTo Err_Command8_Click
Dim stDocName As String
stDocName = "Date_Qry"
DoCmd.OpenReport stDocName, acPreview
Exit_Command8_Click:
Exit Sub
Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click
End Sub

Thanks for your time.

:

Did you actually put NameOfControl? You need to put the actual name of
the
control (just as you changed "NameOfForm" to "frmReport2007")

While frmReport2007 is open (and populated with dates), go to the
Immediate
Window (Ctrl-G), type the following into the bottom:

?Forms!frmReport2007!NameOfControl

and hit Enter (remember, you're not really using NameOfControl!). Does
what's on the form appear in the window?

If so, are you sure you're using the correct query as the recordsource
for
the report?

To close the form after opening the report, try putting DoCmd.Close in
the
module after DoCmd.OpenReport.



--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I've changed parameters in the query to
Forms!frmReport2007!NameOfControl
and
the command button will launch the report on click button, but with
out
the
dates or values in the txt boxes that have been populated by the
calendar.
I
also like the form to close after launching the report. Can this be
done?

Thanks again

:

Change the parameters in your query from [Start Date] and [End
Date]
to
Forms!NameOfForm!NameOfControl

Note that the form must be open when the query is run: the query
will
not
open the form for you.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I have a report that draws from a query I need the report to
report
from
date
to date. At this time, I have parameters set in the query,
between
[Start
Date] and [End Dates], which gives me a dialog boxes. I have
created
a
form
with both start and end dates txt boxes, calendars and a command
button.
By
problem is how to get the dates enter from the calendar in the
txt
boxes
to
call the report, with the start and end dates as a parameters. As
of
now
each
user has two different dialog boxes and no calendar, I see a
problem
coming.
There no way to make changes to the dialog boxes generated, I
suppose?
Thanks
for any help on this problem
 
G

Guest

Thanks Man that did it, I think i'll be able close the form after its
launches the report. O you a Beer

Douglas J. Steele said:
Forms!frmReport2007!txtStartDate!txtEndDate isn't a valid reference. You
have two fields, so they need to be referred to separately as
Forms!frmReport2007!txtStartDate and Forms!frmReport2007!txtEndDate

Where you used to have [Start Date] as a parameter, use
Forms!frmReport2007!txtStartDate

Where you used to have [End Date] as a parameter, use
Forms!frmReport2007!txtEndDate

However, do you have 2 calendar controls on the form? Refer to them rather
than the two text boxes.


My apologies for not being more specific.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


rap43 said:
With ?Forms!frmReport2007!txtStartDate!txtEndDate in the Immediate
Window (Ctrl-G) and Forms!frmReport2007!txtStartDate!txtEndDate in the
query. I am getting error Property let procedure not defined and property
get
procedure did not return an object. Do I need to set properties in the txt
boxes that will be populated by the calendar.



Douglas J. Steele said:
The control names you need in Forms!frmReport2007!NameOfControl are the
controls that hold the date values, not the name of the command button.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I had changed both name in the query. I launch the form and populated
with
dates pressed Ctrl-G and inserted ?Forms!frmReport2007!command8 in the
go
to
the Immediate Window and pressed enter. Error run time 483 object
doesn't
support this porperty or method.
In my query I have [Forms]![frmReport2007]![Command8]. The command
button
in
the form will launch the report with out data. Does the button
properties
need something other than
Private Sub Command8_Click()
On Error GoTo Err_Command8_Click
Dim stDocName As String
stDocName = "Date_Qry"
DoCmd.OpenReport stDocName, acPreview
Exit_Command8_Click:
Exit Sub
Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click
End Sub

Thanks for your time.

:

Did you actually put NameOfControl? You need to put the actual name of
the
control (just as you changed "NameOfForm" to "frmReport2007")

While frmReport2007 is open (and populated with dates), go to the
Immediate
Window (Ctrl-G), type the following into the bottom:

?Forms!frmReport2007!NameOfControl

and hit Enter (remember, you're not really using NameOfControl!). Does
what's on the form appear in the window?

If so, are you sure you're using the correct query as the recordsource
for
the report?

To close the form after opening the report, try putting DoCmd.Close in
the
module after DoCmd.OpenReport.



--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I've changed parameters in the query to
Forms!frmReport2007!NameOfControl
and
the command button will launch the report on click button, but with
out
the
dates or values in the txt boxes that have been populated by the
calendar.
I
also like the form to close after launching the report. Can this be
done?

Thanks again

:

Change the parameters in your query from [Start Date] and [End
Date]
to
Forms!NameOfForm!NameOfControl

Note that the form must be open when the query is run: the query
will
not
open the form for you.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I have a report that draws from a query I need the report to
report
from
date
to date. At this time, I have parameters set in the query,
between
[Start
Date] and [End Dates], which gives me a dialog boxes. I have
created
a
form
with both start and end dates txt boxes, calendars and a command
button.
By
problem is how to get the dates enter from the calendar in the
txt
boxes
to
call the report, with the start and end dates as a parameters. As
of
now
each
user has two different dialog boxes and no calendar, I see a
problem
coming.
There no way to make changes to the dialog boxes generated, I
suppose?
Thanks
for any help on this problem
 

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

Similar Threads

Report help 8
Report Help 1
Dates in a form for filtering Report query 4
Allen Brown's Calendars 3
Dates for Reports 3
Between dates 2
Scheduling 1
Access Sub form opens before the main form in MS Access 0

Top