Auto Fill data in another table

sachinmalik007

Registered User.
Local time
Today, 20:23
Joined
May 2, 2012
Messages
11
Hi,

I have two table LP(Tran_id, Con_no, item_code, item name ) and CON(Tran_id,Con_no)


suppose one record as (5, 10, 100003, Ally)

Therefore my requirement is

i want to multiple copy of first two field's record of LP table in another table CON like

Tran_id Con_no
5 1
5 2
5 3
5 4
5 5
5 6
5 7
5 8
5 9
5 10

* tran_id will be unchange,
* number of record depend on the con_id field in LP table
 
This will require some VBA Code.

You will need to open a Record Set and Create a loop equal to the number of records and append to each row.

Do you have any experience with VBA.
 
Thanks Dear,
But i don't have VBA Coding Exp.

could you write VBA code for me.

Thanks in Advance
 
It might be better if you tell us what you are trying to do and why.

Just explain in simple English without getting technical.

I can't write the Code for you as it is too complicated.

Maybe there is a better way.
 
Thanks For your reply,

Now i am giving U more detail.

Actually i am try to create one small utility for label printing for my company's store.
suppose i receive 10 container of the same material in my store then i have affix approved like label on those container.
till now we affix hand written, but i want to print from computer.

All the field will be same on the label except container field.

Suppose i have one form with the following field

Item code :0025
Item name :XXXX
date :01/04/2012
grn No. :123
Total container Nos : 10

so here i want that, there should be a button on the form,
after filling all field, when we press that button , all these value should be save in table and
generate 10 label/report with the following field

item code : 0025
item name : XXXX
Date : 01/04/2012
GRN No : PM 005
Container : 1 of 10

item code : 0025
item name : XXXX
Date : 01/04/2012
GRN No : PM 005
Container : 2 of 10
.
.
.
Container : 10 of 10


and so on till 10

All the field will be same on the label except container field.
No of label depend on the no of container(if i receive 50 container then the no of label will be 50 )

I hop this time i am able tell you my requirement.
I am also attach sample report for your refe.

Any help will be appreciable.
 

Attachments

Users who are viewing this thread

Back
Top Bottom