Passing Data From A SubForm to A Form.

kostaskir

Registered User.
Local time
Today, 20:37
Joined
Jan 21, 2009
Messages
65
Hello my friends,

I have a quite unusual issue to solve (At least for me it is unusual :confused:).

I have a Form and inside of it a SubForm.

The Subform has a button ! Which adds data to a Table A. Simple !

In my Form I have a TextBox also which takes data From a Query (This particular Query takes data from Table A).

The problem is:
Every time I click the Button in the Subform I would like to pass the data From the Query to the TextBox !

The Query produces only one line of data.


This code is in the Button of the subform:

Code:
Dim con As Integer
Dim varETT As Variant

con = 0
varETT = DLookup("[SumEtt]", "SumaryETT", "[Constant] <> " & con)
Forms![Form1]!ETTSum.Value = varETT
I have tested the code and it works inside of a button in the main form :
The difference is this: Me.ETTSum.Value = varETT

BUT in the subform I just don't know how .....
Is this correct ?: Forms![Form1]!ETTSum.Value = varETT



Thank you in advance !!!
 

Users who are viewing this thread

Back
Top Bottom