report based on single record/prints current record only HELP!!!

  • Thread starter Jean-Francois Gauthier
  • Start date
J

Jean-Francois Gauthier

Hi there,

I am in an urgent need of some help on this. I have a report that contains
information from the table "tbl_bundle", where field "BundleNo" and
"Assigned" on the page header. i also have information from the table
"tbl_docinput" such as "track#", "fkdeptID", "docid", "ClientRef", "Ref#" and
"bundle#" that I would like to show in the details section of the report that
would come out as sort of a list of all the documents or records that make up
part of a bundle ("BundleNo" from tbl_bundle in header = "Bundle#" from
tbl_docinput in details section of the report). I have a form that lists
pretty much the exact same information, and although I know how to make the
pull the report based on the current record that is on the form, when I try
to print the record it prints over the same amount of time over pages that
there are records in the tbl_docinput (currently 262 records). So the same
reports prints this many times. Why I don't know. I want it to print the
currrent record once only. As well, if in the details section I have more
records then can fit on the page, the report does not continue on page 2.
Also not sure why.

PLEASE HELP!!!!
 
E

evilcowstare via AccessMonster.com

Hi dont know if this will help you but when I wanted to print the current
record on my form/table I created a report with all the info I wanted printed
then added a print button to my form.
When the print button was clicked it ran a macro, in that I had it open the
report in print preview with a "where" condition of..

[your main table name]![the id name]=[Forms]![name of form the record is
showed in]![id field of the form]

this will bring basically match the id in your form to the id in your table
and show it all in the report you made.

Hope this helps, dont know if it will

Good luck
Jay
 
J

Jean-Francois Gauthier

hi I did teh following and taht worked. Thanks fro your reply, it sure
brought me in the right direction.

Private Sub Command37_Click()
On Error GoTo Err_Command37_Click

Dim stDocName As String

stDocName = "bundlelog"
DoCmd.OpenReport stDocName, acViewPreview, , "[BundleNo]=" & "'" &
Me![BundleNo] & "'"

Exit_Command37_Click:
Exit Sub

Err_Command37_Click:
MsgBox Err.Description
Resume Exit_Command37_Click

End Sub

evilcowstare via AccessMonster.com said:
Hi dont know if this will help you but when I wanted to print the current
record on my form/table I created a report with all the info I wanted printed
then added a print button to my form.
When the print button was clicked it ran a macro, in that I had it open the
report in print preview with a "where" condition of..

[your main table name]![the id name]=[Forms]![name of form the record is
showed in]![id field of the form]

this will bring basically match the id in your form to the id in your table
and show it all in the report you made.

Hope this helps, dont know if it will

Good luck
Jay

Jean-Francois Gauthier said:
Hi there,

I am in an urgent need of some help on this. I have a report that contains
information from the table "tbl_bundle", where field "BundleNo" and
"Assigned" on the page header. i also have information from the table
"tbl_docinput" such as "track#", "fkdeptID", "docid", "ClientRef", "Ref#" and
"bundle#" that I would like to show in the details section of the report that
would come out as sort of a list of all the documents or records that make up
part of a bundle ("BundleNo" from tbl_bundle in header = "Bundle#" from
tbl_docinput in details section of the report). I have a form that lists
pretty much the exact same information, and although I know how to make the
pull the report based on the current record that is on the form, when I try
to print the record it prints over the same amount of time over pages that
there are records in the tbl_docinput (currently 262 records). So the same
reports prints this many times. Why I don't know. I want it to print the
currrent record once only. As well, if in the details section I have more
records then can fit on the page, the report does not continue on page 2.
Also not sure why.

PLEASE HELP!!!!
 
J

Jean-Francois Gauthier

Hi, thanks for the reply, it brought me in teh right direction. This is what
I did and it worked.

Private Sub Command37_Click()
On Error GoTo Err_Command37_Click

Dim stDocName As String

stDocName = "bundlelog"
DoCmd.OpenReport stDocName, acViewPreview, , "[BundleNo]=" & "'" &
Me![BundleNo] & "'"

Exit_Command37_Click:
Exit Sub

Err_Command37_Click:
MsgBox Err.Description
Resume Exit_Command37_Click

End Sub

evilcowstare via AccessMonster.com said:
Hi dont know if this will help you but when I wanted to print the current
record on my form/table I created a report with all the info I wanted printed
then added a print button to my form.
When the print button was clicked it ran a macro, in that I had it open the
report in print preview with a "where" condition of..

[your main table name]![the id name]=[Forms]![name of form the record is
showed in]![id field of the form]

this will bring basically match the id in your form to the id in your table
and show it all in the report you made.

Hope this helps, dont know if it will

Good luck
Jay

Jean-Francois Gauthier said:
Hi there,

I am in an urgent need of some help on this. I have a report that contains
information from the table "tbl_bundle", where field "BundleNo" and
"Assigned" on the page header. i also have information from the table
"tbl_docinput" such as "track#", "fkdeptID", "docid", "ClientRef", "Ref#" and
"bundle#" that I would like to show in the details section of the report that
would come out as sort of a list of all the documents or records that make up
part of a bundle ("BundleNo" from tbl_bundle in header = "Bundle#" from
tbl_docinput in details section of the report). I have a form that lists
pretty much the exact same information, and although I know how to make the
pull the report based on the current record that is on the form, when I try
to print the record it prints over the same amount of time over pages that
there are records in the tbl_docinput (currently 262 records). So the same
reports prints this many times. Why I don't know. I want it to print the
currrent record once only. As well, if in the details section I have more
records then can fit on the page, the report does not continue on page 2.
Also not sure why.

PLEASE HELP!!!!
 
E

evilcowstare via AccessMonster.com

Glad to hear you fixed it all :eek:)

Jean-Francois Gauthier said:
Hi, thanks for the reply, it brought me in teh right direction. This is what
I did and it worked.

Private Sub Command37_Click()
On Error GoTo Err_Command37_Click

Dim stDocName As String

stDocName = "bundlelog"
DoCmd.OpenReport stDocName, acViewPreview, , "[BundleNo]=" & "'" &
Me![BundleNo] & "'"

Exit_Command37_Click:
Exit Sub

Err_Command37_Click:
MsgBox Err.Description
Resume Exit_Command37_Click

End Sub
Hi dont know if this will help you but when I wanted to print the current
record on my form/table I created a report with all the info I wanted printed
[quoted text clipped - 33 lines]
 

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