recommend a tutorial to print records please?

DeanRowe

Registered User.
Local time
Today, 11:51
Joined
Jan 26, 2007
Messages
142
Hi,
I'm using Access 2000.
I currently use a form to enter my customer details. As soon as the info is entered I need to send out a "thank you for joining" letter, but I can't figure out how to print out a single field, it prints them all.

Ideally I'd like to have a button on the form so I can print it out on a template.

Can anyone recommend a good tutorial on how to do this, or offer any advice please?

Any help would be greatly appreciated!

Many thanks
 
Ok -- nice and easy

Writer your letter/report I presume its an access reprot and not word

create a qry which gets the info require (at this stage it will get all data)
and not just one record

right now we need to filter down to your current record (or record required )

on your qry you need to have soem unique id number (I presume these have PK prime key nos)
good
now unthis field on your qry you have critia

you need the following
Forms!(nameofform)!fieldname

nameofform is the name of the form where you are entering in data
fieldname is the name of the uniquie id number

what this is doing is tell the qry look for the information (filter ) in forms!
and the form to look at is formname! and the field to run from

this will give the qry 1 record to work on

As a helpful tip if in your qry you have soemthing along the lines of the code below
this will dlete any spaces in your address say you have a 3 line address and a postcode and a four line address d-base you will end up with a blank line -mess around with th e code below will delete the blank lines (whereever they appear and will make your letter look a touch better )

copied form an old D/base I know longer use ..


NameAddr: IIf(IsNull([XXXContact]),[AccContact],[XXXContact]) & Chr(13) & Chr(10) & [AccName] & Chr(13) & Chr(10) & [AccAdd1] & IIf(IsNull([AccAdd2]),"",Chr(13) & Chr(10) & [AccAdd2]) & IIf(IsNull([AccAdd3]),"",Chr(13) & Chr(10) & [AccAdd3]) & IIf(IsNull([AccAdd4]),"",Chr(13) & Chr(10) & [AccAdd4]) & IIf(IsNull([AccPostCode]),"",Chr(13) & Chr(10) & [AccPostCode])
 
Thanks for you help guys, I'm almost there!!!

GaryPanic... I've followed all your instructions, but I don't know how to link the print button to the query, and the query to the report!
At the moment when I double click the query, it asks me to enter Parameter Value, so I enter one of the customers unique ID's and all the info I need is shown on the database. So I know that works.

I've followed the instructions in MicroE's post, and created a button on the form, when I click it it loads up my report, but it doesn't have any information linked to it.

I think I just need to link the report to the query, but I dont know how to!!

I'm so close but yet so far!!! HELP ME PLEASE!!!
 
BINGO!!!

Thank you ever so much for your help guys!

I went back through it and I hadn't created my report properly, it wasn't linked correctly to the query I'd made, gonna have a tinker now and try to remove the empty spaces using that code.

Thanks again guys, you've really helped me out!
 
so you got your qry sorted ??

ok lets stop and step back


new qry (use the wizard )
select the table yes
good now select the fields you require (not the first * though)
ok save qry with some meaningful name reportqry1 or helloletterqry - soemthing that makes sense to you

your qry at this point will do all of the data in the table (this is correct)
now your report should be based on this qry
if you made the report already not a problem

open up report and select record source you will find your qry in here - select this

now you will have the fields in your qry avaiable to add to your report (in design mode)
put them where they are required . good view report (yes their will be all of the data records in there )

close and save

good
now get to your form
design mode
add button - wizard - for preview report (or print whatever version you prefer )
report opens up again with all records in it

so we now have report and button that work but no filter

right preview the report by selecting the button again - go to design mode on report
record source and on the right will be 3 ... select this this opens up your qry

good now you should have a record id that is the one you need in your qry (this needs to be in your qry if its not add here ) now we need to tell the qry what we want it to do and this is done with the following

Forms! (means look at forms for the information)
formname! (the name of the form the one with the button on it)
and fieldname the name of the field where the uniq no is it will look something like this

form!customerform!uniqueidno


save
close down the report (save changes yes)
the form will be on record no 1 now

push the button it will open 1 report only onth e first record
 
if you are going to be access recommedn that you geta couple of books
the Access Bible whatever version you are using is good - but heavy reading and there are a couple fo lighter reads about access

you need to spend some time in a bookshop reading these books

don't go for a dummies guide

come up with soem problems or ideas that you want in yourd/b and then go and have a look for the answer

i recommend a good hour

I have access 2003 bible (I could not get the Access 2000 bible) - and this i have found to be v helpful

read it all the way through - as i went put a lot of postit notes all over the book and then - I dove in and started hacking around
 
You are welcome – glad to hear you got your report working.
 

Users who are viewing this thread

Back
Top Bottom