Quote:
Originally Posted by jamesnkk
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