By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,790 Members | 1,409 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,790 IT Pros & Developers. It's quick & easy.

Cannot Save unbound text

100+
P: 134
I have an unbound text - txtfreight on a Subform, when I enter a value , it does not save to the Main form table immediately, unless I close and open up the form. How can I force to save immediately so that I can preview report , since report would be reading the values from the from the underlying table rather than the open form.

I have tried using Forms.frminv.Recalc or Requery , ok this time it save but it cause all other calculated unbound texts value to display #error and keep looping So I remove the Recalc or Requery

How can I resolve it ?

1. In the After Update Event -
2.
3.Forms.frminv.freight = Forms.frminv.frmSubInvoc.Form.txtFreight
4.DoCmd.RunCommand acCmdSaveRecord
5.' forms.frminv.recalc ' Remark off as cause hang

In the Default Value -
=[Forms]![frminv]![Freight]
Jan 5 '08 #1
Share this Question
Share on Google+
5 Replies


100+
P: 134
I have an unbound text - txtfreight on a Subform, when I enter a value , it does not save to the Main form table immediately, unless I close and open up the form. How can I force to save immediately so that I can preview report , since report would be reading the values from the from the underlying table rather than the open form.

I have tried using Forms.frminv.Recalc or Requery , ok this time it save but it cause all other calculated unbound texts value to display #error and keep looping So I remove the Recalc or Requery

How can I resolve it ?

1. In the After Update Event -
2.
3.Forms.frminv.freight = Forms.frminv.frmSubInvoc.Form.txtFreight
4.DoCmd.RunCommand acCmdSaveRecord
5.' forms.frminv.recalc ' Remark off as cause hang

In the Default Value -
=[Forms]![frminv]![Freight]
Hi , I manage to solve by adding refresh, just don;t know why requery and recalc don't work.
Jan 5 '08 #2

puppydogbuddy
Expert 100+
P: 1,923
I have an unbound text - txtfreight on a Subform, when I enter a value , it does not save to the Main form table immediately, unless I close and open up the form. How can I force to save immediately so that I can preview report , since report would be reading the values from the from the underlying table rather than the open form.

I have tried using Forms.frminv.Recalc or Requery , ok this time it save but it cause all other calculated unbound texts value to display #error and keep looping So I remove the Recalc or Requery

How can I resolve it ?

1. In the After Update Event -
2.
3.Forms.frminv.freight = Forms.frminv.frmSubInvoc.Form.txtFreight
4.DoCmd.RunCommand acCmdSaveRecord
5.' forms.frminv.recalc ' Remark off as cause hang

In the Default Value -
=[Forms]![frminv]![Freight]
See below:

1. In the After Update Event of txtFreight on subform
2. If Me.Dirty Then
Me.Dirty = False
End If
3.Forms!frminv!freight.Value = Me!frmSubInvoc!txtFreight
4.' DoCmd.RunCommand acCmdSaveRecord <should not be needed, but try both ways, with this code commented out and with code in>
5.Forms!frminv.recalc


It should not be noticeably slower if coded correctly. Also, note comments in #4
Jan 5 '08 #3

100+
P: 134
See below:

1. In the After Update Event of txtFreight on subform
2. If Me.Dirty Then
Me.Dirty = False
End If
3.Forms!frminv!freight.Value = Me!frmSubInvoc!txtFreight
4.' DoCmd.RunCommand acCmdSaveRecord <should not be needed, but try both ways, with this code commented out and with code in>
5.Forms!frminv.recalc


It should not be noticeably slower if coded correctly. Also, note comments in #4
I tried but don't work, it cause other calculated unbound textboxes display "#error".
Jan 5 '08 #4

puppydogbuddy
Expert 100+
P: 1,923
I tried but don't work, it cause other calculated unbound textboxes display "#error".
Can you step thru/debug the code and tell me which line is generating the # error. Maybe the code sequence is not correct. More info would be helpful...that is... if you are still interested in pursuing this in light of your statement that the refresh method works for you.
Jan 5 '08 #5

100+
P: 134
Can you step thru/debug the code and tell me which line is generating the # error. Maybe the code sequence is not correct. More info would be helpful...that is... if you are still interested in pursuing this in light of your statement that the refresh method works for you.
Thanks will try it out
Jan 5 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.