Current Merchant in Form Report View

PennyPitSt0p

Access 2000 Amateur
Local time
Today, 07:41
Joined
Mar 2, 2006
Messages
16
OK, I think that I may be over thinking this, and that there may be a simple solution to what I am trying to do.

I am not sure if this should be in the Forms section, or in the Reports section, so I am posting this in reports.

Please keep in mind, that I am very new at this, have no formal training and a minimal amount of experience with VBA coding.

I have a form "precall_form_view" that houses existing data in a table, some free form add fields and a lot of validation logic behind it. (I made it that far!)

I have created a report "print_report" that houses all relevant data on a single sheet per precall.

What I would LIKE to do is allow the user to click on a button on the "precall_form_view" that would pull up ONLY the record that they are working on in the "print_report" report. That way, they can print only that record, and not run the risk of printing a 6,000 page report.

Is there a way to do this?

Thanks!

Pennypitst0p
 
Hello:
It sounds like you want to print just the current record. The below code would do this:
'
Private Sub cmdPrintReport_Click()
Dim RecordFilter As String
Dim fOpened As Integer

RecordFilter = " YourPrimaryKey =forms![YourFormName]!YourPrimaryKey"
'Open the report in Print mode (the False parameter)
fOpened = PrintRecord("rptRecord", RecordFilter, False)
'
End Sub
'
You need to substitute your primary key field information as well as the form name. This is placed under a command button titled cmdPrintReport.
'
Regards
Mark
 
Ok

:confused:

Well, it appears that this may WANT to work, however it appears that it does not like the "printrecord" piece.

I am getting a compile error which says sub or function not defined.

The help section is really not much help, so if you could help it would be more help than I am getting...

I like the word help. It seems like I ask for a lot of it!

Thanks!
 
Did you rename "rptReport" to the name of your report in the Print record line?
 

Users who are viewing this thread

Back
Top Bottom