Print Record Button in "form" Format...

Chrism2

Registered User.
Local time
Today, 10:16
Joined
Jun 2, 2006
Messages
161
I'm almost "there" with what I'm trying to do in Access.

I knew this bit would be tricky - perhaps a guru can help me here. :-S

I've taken screen shots of what I'm attempting to do to help describe the situation. (Go easy! It's the first DB I've ever done :-s)

Basically, I need a button on the "Company Job Summary" page that will let me print out one selected record from the job summary shown.

More importantly - I need it to come out looking like the form shown in the "Job Sheet View" which I have set up as a form that gets it's info from both the "Customer" database and the "Jobs" Database.

The Job sheet is controlled by a "Job ID" number - unique to each job.

What's the best way to approach this?

You help, as always, is much appreciated.


Thanks :D
 

Attachments

  • CompanyInfo.jpg
    CompanyInfo.jpg
    43.4 KB · Views: 219
  • EntryPage.jpg
    EntryPage.jpg
    48.9 KB · Views: 195
  • JobSheetView.jpg
    JobSheetView.jpg
    45.4 KB · Views: 188
  • SummaryInfo.jpg
    SummaryInfo.jpg
    40.3 KB · Views: 178
Save the form as a Report and then use the Where clause of the OpenReport method to restrict the report
 
So far so good.... but

:eek: Okay - I've turned the form into a report and a test print shows it is all formatted fine.

I understand the OpenReport function is a Macro - but I don't understand how you could get a button to print one particular Report using the "Jobs" Report template I have made. This bit really is at a level waaaay higher than me.

Could you possibly take me through the creation of this Macro so I can do this... the screenshot shows how I envisage being able to active the report.. I.e.. find the reference from the list shown, type it into the little box shown and press the button...

Many, many thanks. :)
 

Attachments

  • SummaryInfo.jpg
    SummaryInfo.jpg
    42.3 KB · Views: 161
Did you try a search for "Print Current Record"? If you did you would have found this link, when you open link down the bottom you will find an attachment.

Click here for sample db
 
\o/

ansentry said:
Did you try a search for "Print Current Record"? If you did you would have found this link, when you open link down the bottom you will find an attachment.

Click here for sample db


:cool: Okay, I wasn't searching for it that way... and that helped a lot. I won't pretend I understand the code, but with a bit of chopping, I have got it to work on the "job Entry Page". :) :) :)

Question is... is it possible to create a button on the "Summary Info" page that prompts for the JobID number and prints that record in the report format once you have entered it.

Now that would be uber.

Thankyou so much for your help!
 
I had a look at your .jpg and it looks like you are using tabs, so here is a sample that you can change to suit.

When the form open you can click the button Print Preview and it will open a report based on the first record or you can click the Go to Next Record until you reach the record you want and then click print preview.

The combos give you a choice of either number or customer name.

Hope this helps.
 

Attachments

This is exactly what I'm trying to do. I've managed to employ your code into one part of the database, but not in the list view, just as you have done.

How do I get my one to do it!?! The problem seems to revolve around the location of the "Workorder ID" (stated in this line of code):

If IsNull(Forms!frmData.Child5.Form.CustomerID) Then

I've tried various permutations of this to reflect my own database... but no luck. The WorkorderID is located in the CustomerControlPanel / JobsQuerySubform1 form.

But it just won't find it with the lines of code I'm putting in.

Any clues? Thanks for everything!
 
You wrote:
but not in the list view, just as you have done.
I am sorry I don't understand what you mean.

Code:
If IsNull(Forms!frmData.[B]Child5[/B].Form.CustomerID) Then
In my sample Child5 is the name of the control on the Main form; it is not the name of the SubForm.

Post a copy of your db and I or someone will have a look at it.
 
Thankyou... but a coffee and good look around the database revealed the problem.

I'm sure you've said somewhere... don't use spaces when naming items in Access... I'd done just that with the subform, so my code didn't work.

It works perfectly now. I'm over the moon. :D


Thankyou ansentry!
 

Users who are viewing this thread

Back
Top Bottom