create form defined number of new records in a table

Jbliss503

New Member
Joined
Nov 24, 2010
Messages
17
I will tell you guys what I am trying to accomplish, and if it is possible i can elaborate with some specifics.

I am creating a form that will be used to enter service line items in a one to many relationship. The form is fed by a table named [dataEntryOutput] which contains order number information, and a subform which is fed by a table named [dataEntryServiceItems]. These two table are linked together by a field [piOrderNumber]. I want to set the number of line items needed on the form, and have the corresponding number of records created in the table named [dataEntryServiceItems].

is there some simple vba code that i could use as an AfterUpdate event to run after the number of service items is filled out on the form?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Yes it is possible top do. The bigger question is should you. I would tend to say NO.

I do think you are thinking in the right direction. You just need to take it farther.

They way I like to handle this is to use a pop up form that list all the available items. In your case services. The user can check each item they want. When done they click an "add" button that runs VBA code to append all the selected service items.
 
Upvote 0
Thank you for your reply, maybe i should elaborate a little bit as to the purpose of this. I work for a gas facility, and this information is stored as a record of pipe either installed or removed from service. That being said, each Work Order that we receive is treated as 1 Pipe Inventory record. This information is stored in the ORDERS table of a separate data base. This table has a one to many relationship with both service line items and main line items. for each pipe inventory order, there are "x" number of services and "x" number of main line items; however, all of them share the same common pipe inventory order number. So, i have a SERVICE LINE ITEM table that will need to have "x" number of records created with the same pipe inventory order number.
 
Upvote 0
So, i have a SERVICE LINE ITEM table that will need to have "x" number of records created with the same pipe inventory order number.

Then I would expect a related header table that has the "pipe inventory order number".
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,236
Members
448,555
Latest member
RobertJones1986

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top