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