Solved Add multiple selected items to continuous form (1 Viewer)

ahmad_rmh

Member
Local time
Today, 23:53
Joined
Jun 26, 2022
Messages
243
I have data entry form with main and subform i.e, subform is continuous form.

I have made a button on main form i.e, add multiple items, when the user will click on it, it will pop up another continuous form with the following fields,

1. Check field
2. Items Name
3. Packing Size

I want to add mutiple items at a time in the main subform as per the selection by the user.

Kindly share your experience and the way how to achieve this.

Thanks
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:53
Joined
Feb 19, 2002
Messages
43,281
There are cases where this makes sense.

For example, if you are receiving 50 boxes of widgets and you want to assign them each a sequence number so you can track them individually. In this case you would create a loop that looped x times depending on how many items you received and then add a row for each. You would use VBA and the DAO .AddNe to add each record.

A different situation is where you have a list of things like inspections and when you add a new part, you need to add all of the inspections. In this case you would use an append query to copy from the standard for the particular part type and append to the inspections to be done table for that part.

Your situation sounds similar to the first case I described but you need to elaborate please.
 

ahmad_rmh

Member
Local time
Today, 23:53
Joined
Jun 26, 2022
Messages
243
There are cases where this makes sense.

For example, if you are receiving 50 boxes of widgets and you want to assign them each a sequence number so you can track them individually. In this case you would create a loop that looped x times depending on how many items you received and then add a row for each. You would use VBA and the DAO .AddNe to add each record.

A different situation is where you have a list of things like inspections and when you add a new part, you need to add all of the inspections. In this case you would use an append query to copy from the standard for the particular part type and append to the inspections to be done table for that part.

Your situation sounds similar to the first case I described but you need to elaborate please.

Case 1: Receiving of goods
Case 2: Transferring of goods

The warehouse officer is making entry as per the goods receipt note and goods delivery note.

Now, the situation is as under;

The main subform has fields: items, PackingSize, Quantity, expirydate
Note: Items field is a combobox, PackingSize is auto filled as per the selection of item.

The receiving and transferring of items are more than 10 to 20 items at a time, so the mutiple selection form is required to save time.

Multiple selections will just only add items field in the main subform, qty and expiry would be filled by the user.

Kindly share code or something else., thanks
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:53
Joined
Feb 19, 2002
Messages
43,281
Making "empty" entries this way is poor practice. Since these are child records, use a subform since that requires no code to populate the FK. If you use a popup form, you will need code (one line) in the form's BeforeInsert event to populate the FK. You can also add a second line to populate the ItemID. Lock both of these two fields and set their tab property to no so the user doesn't have to tab over them. The user just has access to the two fields he is filling and so he can just tab, tab, tab and fill in the data as he goes.

I also added validation(y)
 

Attachments

  • AutoEntrySample.accdb
    576 KB · Views: 98

ahmad_rmh

Member
Local time
Today, 23:53
Joined
Jun 26, 2022
Messages
243
Making "empty" entries this way is poor practice. Since these are child records, use a subform since that requires no code to populate the FK. If you use a popup form, you will need code (one line) in the form's BeforeInsert event to populate the FK. You can also add a second line to populate the ItemID. Lock both of these two fields and set their tab property to no so the user doesn't have to tab over them. The user just has access to the two fields he is filling and so he can just tab, tab, tab and fill in the data as he goes.

I also added validation(y)


Thanks, Pat

I have added the forms and tables in the database,

If the user will click on add items then the form will pop up and then he will make selection of items as per the selected items, the items should have to be added the subform.

database is attached herewith.
 

Attachments

  • AutoEntrySample.accdb
    1.1 MB · Views: 84

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:53
Joined
Feb 19, 2002
Messages
43,281
Do you have a question or are you just showing your working solution?
 

ahmad_rmh

Member
Local time
Today, 23:53
Joined
Jun 26, 2022
Messages
243
Test your form now. Check the code on your forms.

see post#5.

The database should have to be included in sample database as per my opinion,

As per the developers point of view may be some modifications required, I hope so It should have to be included in sample database category.
 

Users who are viewing this thread

Top Bottom