Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using quantity to create multiple records

Status
Not open for further replies.

DonLo

Technical User
Apr 24, 2001
36
US
Hi

I'm designing an Access application to allow a user to easily create multiple copies of parking permits which have basically the same information. Each printed permit will have 4 common fields (Location, ValidDates, IssuedTo, ESO_Num) and one field which is unique (PermitID).

I'd like to be able to have a form which requests the info for the 4 common fields just once, and a quantity field to indicate how many permits with that set of common information to print.

I thought I would set this up using 2 tables, one called tblPermitSet, which would contain the 4 fields mentioned above, plus a PermitSetID (autonumber). The second table I'll call tblPermits, and it will just have 2 fields - PermitNumber and PermitSetID. Each PermitNumber will be unique, but might reference the same PermitSetID.

To state this in another way, the following might be a typical entry in tblPermitSet:
PermitSetID - 1
Location - Lot 2
ValidDates - Jan. 1, 2, 3
IssuedTo - ABC Corp.
ESO_Num - 123456

If the operator indicated on the form in that she wants 3 permits with this info on it, then the tblPermits would look like this:
PermitNumber PermitSetID
00001234 1
00001235 1
00001236 1

To make this work, I need to have a way to create one record in tblPermitSet and multiple records (# determined by the quant. entered in the form) in tblPermits when the user hits an "ok" button.

Is this doable? Am I approaching this correctly, or is there a better way?

Thanks in advance for your help. I am an infrequent user of Access, so when I do need to work in it, this forum has always been a tremendous help!

Don
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top