Help with calling data from a subform to a text box

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
 

Attachments

  • subformtextissue.JPG
    subformtextissue.JPG
    30.7 KB · Views: 143
  • subformtextissuenotworking.JPG
    subformtextissuenotworking.JPG
    30.6 KB · Views: 149
  • subformtextissuenotworkingerror.JPG
    subformtextissuenotworkingerror.JPG
    18.5 KB · Views: 154
Use the builder. It gets the paths correct.
Usu,: me.suborm.form.txtBox
 
Hi Guys, thank you so much for the help, managed to get it sorted and rempped the text boxed with the builder seemed to have worked ...yeahy!!

thank you very much again for your help. you guys are starts as always.

cheers munk
 

Users who are viewing this thread

Back
Top Bottom