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:
Expand|Select|Wrap|Line Numbers
- Private Sub TxtBudGWP_BeforeUpdate(Cancel As Integer)
- 'Set value of the text box to match the query...
- 'Me.RecordSource = "GWP.tblbudget"
- 'Me.Filter = "QryBudget_Sum"
- 'Me.FilterOn = True
- End Sub
Any idea?
Thanks,
Keith.