Swapping Data between Forms

wjoc1

Registered User.
Local time
Today, 21:09
Joined
Jul 25, 2002
Messages
117
Hi,

I have two forms, networkRefurbishment and addASpecialCode. After entering information onto the form addASpecialCode and exitng from this form I need the information contained in a field called newCode to be transferred over to a field called Code in the second form networkRefurbishment.

networkRefurbishment is still open after addASpecialCode is closed, addASpecialCode justs pops up while entering a record in networkRefurbishment.
I use a button to exit from the first form and I have tried the following code in the sub procedure for this button but no luck!

[Forms]![networkRefurbishment]!
Code:
 = [Forms]![addASpecialCode]![newCode] 

Can someone please help me? 

Liam
 
Try putting the code in the On Exit event...
 
Here is the code I use to tranfer data between two forms for one of my databases, apply it to the OnClick Event of your command button:

Forms.networkRefubishment.Code = Me.newCode
Forms.networkRefubishment.Code.SetFocus
DoCmd.Close
 
I've tried this code but I'm getting an error

Runtime '438':

Object doesn't support this property or method


Any ideas???
 

Users who are viewing this thread

Back
Top Bottom