How to copy records from One Table & paste to another Table from F

G

Guest

I want to copy records from One Table & paste to another Table from Form on
LabelClick Event

I have a form "InvFormA", based on Table "InvTabA" with a Subform
"InvFormB" based on Table "InvTabB"

There is also a Table named "DelvNote" which has all fields same like
InvTAbB except few.

On the Form "InvFormA" there is a Label on which Click Event I want the
following to be done :

Select and copy records of "PartNo", "PartDesc","Qty","UPrice" and
"ExtPrice" from Table "DelvNote" WHERE "DelvNo" = Me.DeliveryNo

Open the RecordSet of Table "InvTabB" and paste the records where the Fields
Label matches and the condition should InvNo=Me.InvNo

Then requery my Subform.

In short summary, Generaly to deliver some material Delivery note has been
made.
Later Invoice is made. So I have to re-type all the details of the Delivery
note in the Invoice Subform. As all the fiels of Delviery note Subform
matches with Invoice Subform, I generally open the Delviery Note Subform,
copy the records manually. Close The delivery note, Open the Invoice, go to
the Invoice subform and Paste it. It works as all the field labels are same.

The same I want to do by VB Code.

Can any of the professional can advise me.
 
J

Jeff Boyce

Irshad

From your description, it seems like you are trying to put copies of fields
into more than one table. While this might be the only way to keep records
related to each other if you were using a spreadsheet, Access is a
relational database.

If you try to use Access as if it were a spreadsheet, you will give both
yourself and Access many headaches as you try to work around what Access is
not designed to do. If you use Access relationally (i.e., use
well-normalized data structure), you will find that it has many quite useful
functions and features.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top