Print Visitor name badges / labels

B

buzzandbeyond

Hi All,

I am building database to input visitors/contractors names and need to
print name badges from the database on the spot - however, I want to
print the one I am currently entering without printing all the others.
Any simple way to do this? I have the following already setup:

1 table
tblSecurityBadge with fields
fld_Name_Id (autonumber)
fld_First_Name
fld_Last_Name
fld_Company_Visiting
fld_Date 'Date()'
fld_Timestamp 'Now()'

1 query
qrySecurityBadge

1 Form
frmSecurityBadges

1 Report
rptqrySecurityBadges

all guidance welcomed
 
A

Albert D. Kallal

The follwing code behind a buttion on your frmScecuirtyBadges shoudld work

me.refresh
docmd.openReport "rptqrySecurityBadges",,,"fld_Name_ID = " & me!fld_Name_ID


The me.refresh forces a disk write (so the reprot can see the changes).

The openReprot uses the "where" clause to restrict reocrds to the current
record..
 
J

Jeff Boyce

Consider using a command button on the form that runs the:

DoCmd.OpenReport,...

method. Check Access HELP for the exact syntax ... and be aware that you
can add in a WHERE clause to limit the report to the record displayed in the
form, with something like:

YourRecordID = Me!YourRecordIDField

(your field and control names, not these).

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

Microsoft Registered Partner
https://partner.microsoft.com/
 

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