printing filtered date on a report(label)

C

Coles

I have a form on which I enter patient date ie name, address, date of birth,
phone #, etc. I would like to put a button on this form that prints a report
(mailing label) with JUST THAT PERSON's data. I currently print such a label
through a query which asks for criteria - lastname, firstname. This is
cumbersome and slow. The primary key is the patient's surname. I have no
experience with macros or visual basic so please 'dumb down' your solutions.
Any help would be appreciated. Thank you. Is. Coles
 
A

Al Campagna

Coles,
The first problem is using the surname as a primary key. What happens
when you have two Smith entries?
You'll have problems down the line if you don't correct that...

You need a real key value, such as an autonumber, to be assured that
each record has a unique value, that differentiates it from all others.

If, for example, you had a autonumber key field called CustID. Then,
while on a specific customers record, a button on your form could be used to
print just that customer label using...
DoCmd.OpenReport "rptMyLabels", , , "CustID = " & CustID
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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