subform data to copy itself into main form

Bilal

Registered User.
Local time
Today, 10:28
Joined
Sep 30, 2013
Messages
64
i have an unbound subform within a main form that i add data to.
once i click save to save all the data the subform data will save itself into tblPerson and the main form data will save itself in tblSupplier.

The tblPerson will have an autonumber for the whole record, i need this autonumber to save in tblSupplier, only this autonumber.

Help! i wasnt sure whether to post this thread in forms or VBA so sorry if ive put it in the wrong place
 
A bound subform would do that for you. How are you saving the main record? If it's bound, you should be able to grab the value into a variable.
 
its all unbound, saving the records using .addnew .update and all that business. if you want to see a copy of the DB let me know
 
Then this type of thing:

Code:
        With rsMaster
          .AddNew
          'field values set here
          .Update
          .Bookmark = .LastModified
          lngARKey = !PrimaryKeyFieldName
        End With
 

Users who are viewing this thread

Back
Top Bottom