Hello my friends,
I have a quite unusual issue to solve (At least for me it is unusual
).
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:
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 !!!
I have a quite unusual issue to solve (At least for me it is unusual
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
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 !!!