Serial Numbers on a Peport

J

JJF

I print Gift Certificates for my Business. How can I place a Consecutive
Serial Number on the report?
 
I

Ian King

Another option is to put a text box on the report, set the control source to
'=1' then set the running sum property to either Over All or Over Group,
depending on your scenario.

Ian King
 
C

Cyber-guy via AccessMonster.com

JJF said:
Thanks for the help. The auto number works fine.
How would you control how many to print using this method?
[quoted text clipped - 7 lines]


I've used atonumber in the past and I've had problems with it, particularly
if a user canceled or exited from the form without finishing - I would end up
with missing numbers - probably a real problem with gift certificates -
here's an alternative aproach

Create a table GiftNum with one field - GiftID
enter the starting number into the field

Use the following code when printing the certifcate

Dim db As Database
Set db = CurrentDb
Set rs = db.OpenRecordset("GiftNum", 2)
rs.MoveFirst ' go to first record
[COR-ID] = rs![GiftID] ' serial # for this certificate

' you can do your printing here with logic to verify it printed OK

With rs
..Edit ' update the GiftID
![GiftID] = rs![GiftID] + 1 ' add 1 to report #
..Update ' store the result for next report
End With

This way the number for the next serial is not updated until your sure the
certificate has been printed

Hope this helps,
Cyber-guy



If you'd like a sample db, post your email & I'll send it to you
 

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