Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying data from a field in forms 1

Status
Not open for further replies.

Stangleboy

Programmer
May 6, 2002
76
US
I have a form (frmICLog) and within this form is a sub form (sfrnICLog) and there is an "AutoNumber" field (ICLogID) that I want to copy to another form that opens on top of the main form (with subform). I want to copy the field (ICLogID) to my new form (frm_Person) that was the same named field (ICLogID). But I can't get my code to work, I get Mismacth data:

Private Sub Form_Load()

Dim frm As Form
Set frm = Forms!frmICLog!sfrmICLog!ICLogID

Me!ICLogID.SetFocus
Me!ICLogID = frm!ICLogID
Me!ICLLastName.SetFocus

End Sub

Any help would greatly be appreciated, thank you in advance.
 
Set frm = Forms!frmICLog!sfrmICLog.Form

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top