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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Program to generate all possible records for a table structure 1

Status
Not open for further replies.

Paul77fox

Technical User
Feb 6, 2013
14
IT
Hello guys. I'm new in ms access and I would like to know how to generate all the possible records for this table structure:
client_ID : month_id : service_id : amount
I have 30 clients, 10 months and 35 services
I would like to have 30x10x35 records in my table (generated programmatically) with amount "null" of course. Is this even possible? Thnak you and have a nice day!
 
I assume you have a client and a month and a service tables.
If so you don't need a program but a single query like this:
Code:
INSERT INTO yourTable (client_ID, month_id, service_id)
SELECT C.ID, M.ID, S.ID FROM tblClient C, tblMonth M, tblService S

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top