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

Copying data from subform to subform 1

Status
Not open for further replies.

mike0680

Technical User
Feb 17, 2003
28
GB
I've written a fairly basic Access 2000 program for a garage.

I'm trying to transfer data from a fixed price service form/subform to a job card form/subform and then to a sales invoice form/subform. The main form isn't a problem, it's the subform, that only copies the first record.

They have a fixed price service charge for 30 different vehicles and 4 to 5 levels of service. I use a main form for the service details and subform of 4 to 10 different parts (oil, filters and so on....)
From this Fixed Price Service form I produce a Job Card for the workshop technicians in the same format adding customer and vehicle id details from their tables and transferring details from the main form and parts details from the subform.
The parts are picked the day before and when the customer drops off the car the parts are automatcically taken off from stock.
When he comes back for his car, a sales invoice is produced by transferring data from the job card.
As I say, this works great, but for only the first record from the subform copies over.
I've tried every type of do...loop, but no luck.

Any ideas???
 
Hallo,

One way would be to use an SQL Append query, in a RunSQL statement.
Design your query in the query builder, then paste the SQL into the code when you're happy with it (you'll have to mess about with parameters etc. but nothing too horrendous,

- Frink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top