Copy field names to records

Xenix

Registered User.
Local time
Today, 07:48
Joined
Oct 8, 2001
Messages
124
Doe's anyone know a command line to copy the present form data fields to a seperate table?

e.g. [Customer].
Code:
 = [Code]
but this don't work   [img]http://www.access-programmers.co.uk/ubb/frown.gif[/img]

P.S. I guess I put it in the afterinsert section?

thanks in advance  [img]http://www.access-programmers.co.uk/ubb/smile.gif[/img]
Mike

[This message has been edited by Xenix (edited 11-06-2001).]
 
I would initially like to ask why you are duplicating data into 2 tables, rather than creating a relationship between them? Are you copying to a new record or amending a current one?
using the afterupdate event, you can set a tables field as
[TableName].[FieldName] = Me.txtControlName
 
The problem is that I store previous quotes
and the buyprice in the table changes as stock is updated, so I need to store the quoted buyprice in a seperate table for later reference.
 
Aha, now I get ya. Did the code work? If you want to insert new records in the table so that ALL of your previous quotes are kept, It maybe better to use a recordset to update your quotes table. Send it over and I'll have a butchers if you want.
 
Sorted. Add the lastprice field from the products table into the QuotationDetails query. Then set the AfterInsert event to
Me.lastprice = Me.buyprice

Hope this helps.

PS, I forgot to say that you must reset the Record Source on the form to the *new* query. Glad it now works!

[This message has been edited by Fizzio (edited 11-08-2001).]
 

Users who are viewing this thread

Back
Top Bottom