chuckcoleman
Registered User.
- Local time
- Today, 10:42
- Joined
- Aug 20, 2010
- Messages
- 357
Hi,
I have a Continuous form. On each row there are two fields important to this question. One if a Option Group and the other is a date field. At the bottom of the form is an unbound text box with the following control source: =DCount("*","[Count Work Completed]"). The DCount works properly. It evaluates the data for the Option Group and the date field.
I'm trying to get the text box to update with the count after the entry for the Option Group or the date field occurs. The Option Group works perfectly 100% of the time. The date field never updates the text box. I've tried before update and after update on both the text box and the form itself. I've put a command button on the form for testing purposes and it works 100% of the time to update the text box. It's just after entering a date in the date field.
The code I've used is:
Dim UpdateNbr As Control
Set UpdateNbr = Forms![Work Completed Form]![NumberToUpdateX]
DoCmd.RunCommand acCmdSaveRecord
UpdateNbr.Requery
OR simply
Me.NumberToUpdate.Requery
I haven't been able to get either to work. I'm wondering if the continuous form is creating the challenge.
Any ideas?
Thanks,
Chuck
I have a Continuous form. On each row there are two fields important to this question. One if a Option Group and the other is a date field. At the bottom of the form is an unbound text box with the following control source: =DCount("*","[Count Work Completed]"). The DCount works properly. It evaluates the data for the Option Group and the date field.
I'm trying to get the text box to update with the count after the entry for the Option Group or the date field occurs. The Option Group works perfectly 100% of the time. The date field never updates the text box. I've tried before update and after update on both the text box and the form itself. I've put a command button on the form for testing purposes and it works 100% of the time to update the text box. It's just after entering a date in the date field.
The code I've used is:
Dim UpdateNbr As Control
Set UpdateNbr = Forms![Work Completed Form]![NumberToUpdateX]
DoCmd.RunCommand acCmdSaveRecord
UpdateNbr.Requery
OR simply
Me.NumberToUpdate.Requery
I haven't been able to get either to work. I'm wondering if the continuous form is creating the challenge.
Any ideas?
Thanks,
Chuck