Copy Form Data to another table

bonekrusher

Registered User.
Local time
Today, 00:54
Joined
Nov 19, 2005
Messages
266
Hi All,

I have a form which is bound to a table. I want some of the Data to go to another table which is not the control source. I am trying this code, but no luck. What am I doing wrong?

Code:
 Table![tblImageBLOBs]![record_number] = Me.aud_number

Thanks

Bones
 
This is what I have so far, but its still not working:
The form is called MX110
The Table is called TBLImageBLOBS

Code:
Dim DB As DAO.Database
Dim RST As DAO.Recordset
Set DB = CurrentDb
Set RST = DB.OpenRecordset(tblImageBLOBs)
RST.AddNew
RST!record_number = Me.aud_number
RST.Update
Set RST = Nothing
Set DB = Nothing
 
Last edited:
Bind your form to a query rather than a table. In the query, join the two tables and then all of the fields of the other table are available to do as you choose.
 
Almost certainly but is there some reason you can not use the query builder?
 
I have alot tied to the bound table. It would be easier to just figure the code.
 
Your form can not tell the difference between a query and a table. Make a query of the table that includes all of the fields and change your form RecordSource to the query instead of the table. You will see all works the same. Now go back to the query and add the other table and the linkage and bring down the fields you need. Try the form again and see if everything is still working as expected. I think you will find that it is.
 

Users who are viewing this thread

Back
Top Bottom