473,320 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Cannot Save unbound text

134 100+
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
5 2113
jamesnkk
134 100+
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
1,923 Expert 1GB
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
jamesnkk
134 100+
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
1,923 Expert 1GB
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
jamesnkk
134 100+
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

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

Similar topics

11
by: deko | last post by:
I need to create different recordsets based on queries that use data from unbound fields in a form. I've discovered that I can't do this, and instead need to save the data in question (usually a...
2
by: Dave Griffiths | last post by:
Access 97 - I have a form with a single unbound text field. I want to have a timer event which periodically saves the contents of that field. But I noticed that if the focus stays on the field then...
2
by: Todd | last post by:
Hello, I'm curious if anyone knows of a way (if one exists) to tell a form (in Access 2002 VBA) to sort on an unbound column of a combo box on the form. Here's what I want to do: A combo box...
2
by: Joe | last post by:
I have a form which displays data in 3 related tables. I want to give the user a prompt to save changes when any field has been modfied on the form. Is there a easy way to do this so the 1 or...
2
by: Zlatko Matiæ | last post by:
Hello. I have the following problem with MS Access/PostgreSQL combination: There is a form in Access that has an unbound text box, used for entering a commentary of a batch of records. There is a...
2
by: hmiller | last post by:
Hope I make my case clear!!! I have a table with two bound date/time fields. I want to be able to use an IF statement and DateDiff to return a text message in an unbound text box. I want to do...
10
by: Matthew Wells | last post by:
Hello. I've converted a bound Access 2000 form which displays data retrieved from an Access 2000 database to an unbound form. Now my hyperlinks don't work. I'm assuming it's because the form...
2
by: KC-Mass | last post by:
I have a form that is used to ID and then load Excel files into Access. I use labels on the form to record which file was last loaded. That was accomplished with a simple lblFileLoaded =...
1
by: MyWaterloo | last post by:
I have an unbound text box on my main form that is used to show the sum totals in my sub form. I also have a field on my main form that has a control source in a table. This bound field needs to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.