Hello:
I have a continous form that displays various forecasting records that an End user can add or edit the records (this feeds off of a query that I created called "ReQryForecast" ). On that form, in the top corner, I placed 4 unbound text boxes that displays summary information. On one of them, "TxtBudGWP" I want to display the specific budget number for that particular month. This information is on a separate table I call tblbudget. I created a query called "QryBudget_ Sum" that gives me the number I am looking for. Now I just want to populate that value into "TxtBudGWP" when the form opens.
I tried the following code in the before update event of TxtBudGWP:
[Code=vb]Private Sub TxtBudGWP_Befor eUpdate(Cancel As Integer)
'Set value of the text box to match the query...
'Me.RecordSourc e = "GWP.tblbud get"
'Me.Filter = "QryBudget_ Sum"
'Me.FilterOn = True
End Sub[/code]
But nothing happen when the form loaded. I am not too sure if this is the correct method of doing this.
Any idea?
Thanks,
Keith.
I have a continous form that displays various forecasting records that an End user can add or edit the records (this feeds off of a query that I created called "ReQryForecast" ). On that form, in the top corner, I placed 4 unbound text boxes that displays summary information. On one of them, "TxtBudGWP" I want to display the specific budget number for that particular month. This information is on a separate table I call tblbudget. I created a query called "QryBudget_ Sum" that gives me the number I am looking for. Now I just want to populate that value into "TxtBudGWP" when the form opens.
I tried the following code in the before update event of TxtBudGWP:
[Code=vb]Private Sub TxtBudGWP_Befor eUpdate(Cancel As Integer)
'Set value of the text box to match the query...
'Me.RecordSourc e = "GWP.tblbud get"
'Me.Filter = "QryBudget_ Sum"
'Me.FilterOn = True
End Sub[/code]
But nothing happen when the form loaded. I am not too sure if this is the correct method of doing this.
Any idea?
Thanks,
Keith.
Comment