subreport control, maybe?

G

Guest

I have two reports, derived from 2 queries based on the same table.The
information on the table will be continually added to. Both of the queries
are set up to reteive info by date. I created the first Query to show the
dates, and the second one does not show the dates. I used the first report
showing the date as my main report and the second report as my subreport
without the date showing.

My problem is that I have to put the start and end dates in twice, once for
each report. I think I missed my chance to link these when I was prompted to
in the supreport control. Is there some place that I can link these two
reports so that I am only prompted once for the start and end date as they
will be always be the same for both?

thank you in advance for all of the great advice and assistance I have
received.
 
M

M.Garza

I have two reports, derived from 2 queries based on the same table.The
information on the table will be continually added to. Both of the queries
are set up to reteive info by date. I created the first Query to show the
dates, and the second one does not show the dates. I used the first report
showing the date as my main report and the second report as my subreport
without the date showing.

My problem is that I have to put the start and end dates in twice, once for
each report. I think I missed my chance to link these when I was prompted to
in the supreport control. Is there some place that I can link these two
reports so that I am only prompted once for the start and end date as they
will be always be the same for both?

thank you in advance for all of the great advice and assistance I have
received.

I had the same issue and when I checked this site out I got my
answer. I am super new at this but I love it!

I created a form with two unbound fields, one for the start and the
other for the end date. I then added a control button and set the
code to open up the report I wanted.
EXAMPLE:
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click

Dim stDocName As String

stDocName = "Streets_Available_with_Parameters"
DoCmd.OpenReport stDocName, acPreview

Exit_Command5_Click:
Exit Sub

Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub

Before all this works you have to tell both your queries (the one that
runs your main and the one that runs your sub reports) to look in the
form for the dates requested.

You do that by adding the form and field names where you enter your
data in your query. For instance:

You created a form (Form1) with two text boxes: BeginDate and EndDate
in the Name field. Leave the control source blank. Then you go to
your queries in design view and either type in or use the "build
function" to enter:

Between [Forms]![Form1]![BeginDate] And [Forms]![Form1]![EndDate]

save your query, remeber to do the same for your the query that runs
the sub report. When all is said and done, you should be able to go
to your form, enter the dates you want and press the open report
button to open your report with the specified date range.

Hope this helps.
 
G

Guest

I'll give this a try tomorrow. Thanks. I agree. this site is wonderful.

M.Garza said:
I have two reports, derived from 2 queries based on the same table.The
information on the table will be continually added to. Both of the queries
are set up to reteive info by date. I created the first Query to show the
dates, and the second one does not show the dates. I used the first report
showing the date as my main report and the second report as my subreport
without the date showing.

My problem is that I have to put the start and end dates in twice, once for
each report. I think I missed my chance to link these when I was prompted to
in the supreport control. Is there some place that I can link these two
reports so that I am only prompted once for the start and end date as they
will be always be the same for both?

thank you in advance for all of the great advice and assistance I have
received.

I had the same issue and when I checked this site out I got my
answer. I am super new at this but I love it!

I created a form with two unbound fields, one for the start and the
other for the end date. I then added a control button and set the
code to open up the report I wanted.
EXAMPLE:
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click

Dim stDocName As String

stDocName = "Streets_Available_with_Parameters"
DoCmd.OpenReport stDocName, acPreview

Exit_Command5_Click:
Exit Sub

Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub

Before all this works you have to tell both your queries (the one that
runs your main and the one that runs your sub reports) to look in the
form for the dates requested.

You do that by adding the form and field names where you enter your
data in your query. For instance:

You created a form (Form1) with two text boxes: BeginDate and EndDate
in the Name field. Leave the control source blank. Then you go to
your queries in design view and either type in or use the "build
function" to enter:

Between [Forms]![Form1]![BeginDate] And [Forms]![Form1]![EndDate]

save your query, remeber to do the same for your the query that runs
the sub report. When all is said and done, you should be able to go
to your form, enter the dates you want and press the open report
button to open your report with the specified date range.

Hope this helps.
 
G

Guest

Isn't there an easier way to do this? I have not even attempted a form yet.
I am also super new at this.

Anyone have a way to get back to the subreport control?

M.Garza said:
I have two reports, derived from 2 queries based on the same table.The
information on the table will be continually added to. Both of the queries
are set up to reteive info by date. I created the first Query to show the
dates, and the second one does not show the dates. I used the first report
showing the date as my main report and the second report as my subreport
without the date showing.

My problem is that I have to put the start and end dates in twice, once for
each report. I think I missed my chance to link these when I was prompted to
in the supreport control. Is there some place that I can link these two
reports so that I am only prompted once for the start and end date as they
will be always be the same for both?

thank you in advance for all of the great advice and assistance I have
received.

I had the same issue and when I checked this site out I got my
answer. I am super new at this but I love it!

I created a form with two unbound fields, one for the start and the
other for the end date. I then added a control button and set the
code to open up the report I wanted.
EXAMPLE:
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click

Dim stDocName As String

stDocName = "Streets_Available_with_Parameters"
DoCmd.OpenReport stDocName, acPreview

Exit_Command5_Click:
Exit Sub

Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub

Before all this works you have to tell both your queries (the one that
runs your main and the one that runs your sub reports) to look in the
form for the dates requested.

You do that by adding the form and field names where you enter your
data in your query. For instance:

You created a form (Form1) with two text boxes: BeginDate and EndDate
in the Name field. Leave the control source blank. Then you go to
your queries in design view and either type in or use the "build
function" to enter:

Between [Forms]![Form1]![BeginDate] And [Forms]![Form1]![EndDate]

save your query, remeber to do the same for your the query that runs
the sub report. When all is said and done, you should be able to go
to your form, enter the dates you want and press the open report
button to open your report with the specified date range.

Hope this helps.
 
M

M.Garza

Isn't there an easier way to do this? I have not even attempted a form yet.
I am also super new at this.

Anyone have a way to get back to the subreport control?



I had the same issue and when I checked this site out I got my
answer. I am super new at this but I love it!
I created a form with two unbound fields, one for the start and the
other for the end date. I then added a control button and set the
code to open up the report I wanted.
EXAMPLE:
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click
Dim stDocName As String
stDocName = "Streets_Available_with_Parameters"
DoCmd.OpenReport stDocName, acPreview
Exit_Command5_Click:
Exit Sub
Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub
Before all this works you have to tell both your queries (the one that
runs your main and the one that runs your sub reports) to look in the
form for the dates requested.
You do that by adding the form and field names where you enter your
data in your query. For instance:
You created a form (Form1) with two text boxes: BeginDate and EndDate
in the Name field. Leave the control source blank. Then you go to
your queries in design view and either type in or use the "build
function" to enter:
Between [Forms]![Form1]![BeginDate] And [Forms]![Form1]![EndDate]
save your query, remeber to do the same for your the query that runs
the sub report. When all is said and done, you should be able to go
to your form, enter the dates you want and press the open report
button to open your report with the specified date range.
Hope this helps.- Hide quoted text -

- Show quoted text -

You can open the report in design view and click on the properties of
the subreport, look for two fields one is called MasterLink and the
other ChildLink (they are one on top of the other); type in the fields
that you want to link in the MasterLink and then the same ones in the
ChildLink save your report. This links the reports by the fields you
requested.

Hope this helps...
Maria
 
M

M.Garza

Isn't there an easier way to do this? I have not even attempted a form yet.
I am also super new at this.
Anyone have a way to get back to the subreport control?
M.Garza said:
On Mar 8, 3:54 pm, Frustrated in AL
I have two reports, derived from 2 queries based on the same table.The
information on the table will be continually added to. Both of the queries
are set up to reteive info by date. I created the first Query to show the
dates, and the second one does not show the dates. I used the first report
showing the date as my main report and the second report as my subreport
without the date showing.
My problem is that I have to put the start and end dates in twice, once for
each report. I think I missed my chance to link these when I was prompted to
in the supreport control. Is there some place that I can link these two
reports so that I am only prompted once for the start and end date as they
will be always be the same for both?
thank you in advance for all of the great advice and assistance I have
received.
I had the same issue and when I checked this site out I got my
answer. I am super new at this but I love it!
I created a form with two unbound fields, one for the start and the
other for the end date. I then added a control button and set the
code to open up the report I wanted.
EXAMPLE:
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click
Dim stDocName As String
stDocName = "Streets_Available_with_Parameters"
DoCmd.OpenReport stDocName, acPreview
Exit_Command5_Click:
Exit Sub
Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub
Before all this works you have to tell both your queries (the one that
runs your main and the one that runs your sub reports) to look in the
form for the dates requested.
You do that by adding the form and field names where you enter your
data in your query. For instance:
You created a form (Form1) with two text boxes: BeginDate and EndDate
in the Name field. Leave the control source blank. Then you go to
your queries in design view and either type in or use the "build
function" to enter:
Between [Forms]![Form1]![BeginDate] And [Forms]![Form1]![EndDate]
save your query, remeber to do the same for your the query that runs
the sub report. When all is said and done, you should be able to go
to your form, enter the dates you want and press the open report
button to open your report with the specified date range.
Hope this helps.- Hide quoted text -
- Show quoted text -

You can open the report in design view and click on the properties of
the subreport, look for two fields one is called MasterLink and the
other ChildLink (they are one on top of the other); type in the fields
that you want to link in the MasterLink and then the same ones in the
ChildLink save your report. This links the reports by the fields you
requested.

Hope this helps...
Maria- Hide quoted text -

- Show quoted text -

I forgot to tell you, finding these to me seems a little tricky in
order to find the fields you just drag your mouse while pressing right
click over the sub report in desgin view. This should select the
entire subreport, (you'll see small squares along your subreport after
the first step) place your arrow (mouse) on any one of those small
squares then left click and select properties, under the data tab you
should see:

Source Object NAME OF YOUR SUBREPORT
Link Child Fields NAME OF FIELDS IN SUBREPORT YOU WANT TO
LINK TO MAIN REPORT
Link Master Fields NAME OF FIELDS IN MAIN REPORT YOU WANT
SUBREPORT TO BE LINKED BY (same as above)

here is where you can link your main and sub report fields (example
above) seperate each field name with a semi colon (;)

Let me know how it turns out. I too am new to ACCESS but I am
starting to get the hang of it.

Maria
 
G

Guest

I don't have the start / end date field as a visible field on my subreport.
These are the fields that I want to link in hopes of having to enter the
start and end dates only once.

Any other suggestions?

M.Garza said:
Isn't there an easier way to do this? I have not even attempted a form yet.
I am also super new at this.
Anyone have a way to get back to the subreport control?
:
On Mar 8, 3:54 pm, Frustrated in AL
I have two reports, derived from 2 queries based on the same table.The
information on the table will be continually added to. Both of the queries
are set up to reteive info by date. I created the first Query to show the
dates, and the second one does not show the dates. I used the first report
showing the date as my main report and the second report as my subreport
without the date showing.
My problem is that I have to put the start and end dates in twice, once for
each report. I think I missed my chance to link these when I was prompted to
in the supreport control. Is there some place that I can link these two
reports so that I am only prompted once for the start and end date as they
will be always be the same for both?
thank you in advance for all of the great advice and assistance I have
received.
I had the same issue and when I checked this site out I got my
answer. I am super new at this but I love it!
I created a form with two unbound fields, one for the start and the
other for the end date. I then added a control button and set the
code to open up the report I wanted.
EXAMPLE:
Private Sub Command5_Click()
On Error GoTo Err_Command5_Click
Dim stDocName As String
stDocName = "Streets_Available_with_Parameters"
DoCmd.OpenReport stDocName, acPreview
Exit_Command5_Click:
Exit Sub
Err_Command5_Click:
MsgBox Err.Description
Resume Exit_Command5_Click
End Sub
Before all this works you have to tell both your queries (the one that
runs your main and the one that runs your sub reports) to look in the
form for the dates requested.
You do that by adding the form and field names where you enter your
data in your query. For instance:
You created a form (Form1) with two text boxes: BeginDate and EndDate
in the Name field. Leave the control source blank. Then you go to
your queries in design view and either type in or use the "build
function" to enter:
Between [Forms]![Form1]![BeginDate] And [Forms]![Form1]![EndDate]
save your query, remeber to do the same for your the query that runs
the sub report. When all is said and done, you should be able to go
to your form, enter the dates you want and press the open report
button to open your report with the specified date range.
Hope this helps.- Hide quoted text -
- Show quoted text -

You can open the report in design view and click on the properties of
the subreport, look for two fields one is called MasterLink and the
other ChildLink (they are one on top of the other); type in the fields
that you want to link in the MasterLink and then the same ones in the
ChildLink save your report. This links the reports by the fields you
requested.

Hope this helps...
Maria- Hide quoted text -

- Show quoted text -

I forgot to tell you, finding these to me seems a little tricky in
order to find the fields you just drag your mouse while pressing right
click over the sub report in desgin view. This should select the
entire subreport, (you'll see small squares along your subreport after
the first step) place your arrow (mouse) on any one of those small
squares then left click and select properties, under the data tab you
should see:

Source Object NAME OF YOUR SUBREPORT
Link Child Fields NAME OF FIELDS IN SUBREPORT YOU WANT TO
LINK TO MAIN REPORT
Link Master Fields NAME OF FIELDS IN MAIN REPORT YOU WANT
SUBREPORT TO BE LINKED BY (same as above)

here is where you can link your main and sub report fields (example
above) seperate each field name with a semi colon (;)

Let me know how it turns out. I too am new to ACCESS but I am
starting to get the hang of it.

Maria
 
M

Marshall Barton

Frustrated said:
Isn't there an easier way to do this? I have not even attempted a form yet.
I am also super new at this.


Using a form IS the easy way. Just because you have not
done it yet does not make it difficult. Ignoring the
possibility that learning is difficult, it just means you
need to figure out how to create and use a simple unbound
form.
 
M

M.Garza

Using a form IS the easy way. Just because you have not
done it yet does not make it difficult. Ignoring the
possibility that learning is difficult, it just means you
need to figure out how to create and use a simple unbound
form.

I agree with Marsh. Up unitl one day before I sent the first response
I had no idea how to create a form for my reports and now I am using
them left and right! I love ACCESS!

Maria
 

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