G
Guest
Hi,
I have a main form with a tab strip control containing 3 tabbed pages.
Each tabbed page contains a subform. Each tabbed page contains label controls.
In the footer section of each subform are text box controls with sum
functions used to sum the values in particular rows of the data sheet.
In the change event of the tabcontrol which is on the main form I have code
like this:
With Me.SubFormChild1.Form.RecordsetClone
If .RecordCount > 0 Then
Me.lblamount.Caption =
Format(Me.SubFormChild1.Form.txtamounttotal.Value, "#,##.00")
End If
End With
the recordsetclone is used to determine if there are records because if
there are
none and I try to put the totaled value into the caption property it will
error.
This works fine when I step through the code in debug mode.
If I turn off the break point and let it run without stopping the labels do
not
get populated they are empty and my default value of 0 (zero) is wiped out.
Now when I exist the debugged code I have to goto the window drop down in
Access and choose my main form again to get it to be seen. This likely fires
some sort of event that refreshes the form or something and lets the values
display.
I played around with refreshing the form wiht .refresh but does'nt work.
I'm confused.
Chris
I have a main form with a tab strip control containing 3 tabbed pages.
Each tabbed page contains a subform. Each tabbed page contains label controls.
In the footer section of each subform are text box controls with sum
functions used to sum the values in particular rows of the data sheet.
In the change event of the tabcontrol which is on the main form I have code
like this:
With Me.SubFormChild1.Form.RecordsetClone
If .RecordCount > 0 Then
Me.lblamount.Caption =
Format(Me.SubFormChild1.Form.txtamounttotal.Value, "#,##.00")
End If
End With
the recordsetclone is used to determine if there are records because if
there are
none and I try to put the totaled value into the caption property it will
error.
This works fine when I step through the code in debug mode.
If I turn off the break point and let it run without stopping the labels do
not
get populated they are empty and my default value of 0 (zero) is wiped out.
Now when I exist the debugged code I have to goto the window drop down in
Access and choose my main form again to get it to be seen. This likely fires
some sort of event that refreshes the form or something and lets the values
display.
I played around with refreshing the form wiht .refresh but does'nt work.
I'm confused.
Chris