munkeyroot
Registered User.
- Local time
- Today, 17:55
- Joined
- Jan 13, 2011
- Messages
- 76
Hi everyone
I am having a bit of an issue with calling data(Totals) from a subform in a text box.
I have setup a subform 'frmSubRolesSelect' on my main form 'frmmainsheet' and i have a two totals text boxes on the sub form footer to calculate the Total hrs and the Total charge rate.
=Sum([labour hrs])
=Sum([Labour rate]*[labour hrs])
on the Subform i have a roles field which is a combo, looking a 'roles qry' from a roles table to give me the roles combo data and also the charge rate which roles are what charges. this is set to auto fill the charge rate.
On the main form i have two text boxes which are conditioned to pull the data from the subform text boxes.
=[frmSubRoleSelect].[Form]![TotalPrice]
=[frmSubRoleSelect].[Form]![TotalHrs]
this all seems to work ok while i am working and testing it. but then as soon as i close the the main form down and MSaccess then relaunch MSaccess and the database, the main form seems to forget the the subform exist and causes (though i can still see the subform and use it, if i try to use the subform i get a linkmasterfields error 'return without GoSub') the two text boxes on the main form to produce an error '##name?'.
if then open the mainform in DV and then make a change then save it open the main form in FV it's ok works fine...its really really weird
i've even tried to re-build the forms still getting the same issues.
also if i delete the main forms text boxes the db is ok again.
any thoughts?
cheers Munk
i've put some screen shot on here of it working then not and the error when i try to use the subform
I am having a bit of an issue with calling data(Totals) from a subform in a text box.
I have setup a subform 'frmSubRolesSelect' on my main form 'frmmainsheet' and i have a two totals text boxes on the sub form footer to calculate the Total hrs and the Total charge rate.
=Sum([labour hrs])
=Sum([Labour rate]*[labour hrs])
on the Subform i have a roles field which is a combo, looking a 'roles qry' from a roles table to give me the roles combo data and also the charge rate which roles are what charges. this is set to auto fill the charge rate.
On the main form i have two text boxes which are conditioned to pull the data from the subform text boxes.
=[frmSubRoleSelect].[Form]![TotalPrice]
=[frmSubRoleSelect].[Form]![TotalHrs]
this all seems to work ok while i am working and testing it. but then as soon as i close the the main form down and MSaccess then relaunch MSaccess and the database, the main form seems to forget the the subform exist and causes (though i can still see the subform and use it, if i try to use the subform i get a linkmasterfields error 'return without GoSub') the two text boxes on the main form to produce an error '##name?'.
if then open the mainform in DV and then make a change then save it open the main form in FV it's ok works fine...its really really weird
i've even tried to re-build the forms still getting the same issues.
also if i delete the main forms text boxes the db is ok again.
any thoughts?
cheers Munk
i've put some screen shot on here of it working then not and the error when i try to use the subform