Moving Contents of a Fieldin a Table to Another Form/Table (1 Viewer)

RogerB

Registered User.
Local time
Today, 00:47
Joined
May 25, 2000
Messages
10
What is the vba action(s) which copy data from a field in a tabel and assign it to a field in a a separate table?
 

Mitch

Registered User.
Local time
Today, 00:47
Joined
May 23, 2000
Messages
31
Recordsets again


Dim rst as recordset
dim dbs as database

' creates a set of the record which matches the record you want
set dbs = currentdb
set rst = dbs.openrecordset("SELECT * FROM tblYourTable WHERE fldYourKey =" & "'" & txtYourKey & "'", dbopendynaset)
[txtCopyOfData] = rst![fldYouWantToCopy]

The txtCopyOfData should be bound to the field you want to store it in. It fairly vague i know but should get you going in the right direction as there wasn't much detail.

Mitch.
 

Users who are viewing this thread

Top Bottom