Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / July 2005

Tip: Looking for answers? Try searching our database.

Force an update

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
HelenJ - 09 Jul 2005 14:24 GMT
I am running a calculation based on a value that is entered into a control on
a form (the calculation runs when a button is clicked) however it does not
return the correct value until I have moved onto the next record and then
back again - I assume forcing an update to the record.

Is there any way (preferably through using a Macro since I am really
struggling with the VB) to get this to happen

Thanks
Allen Browne - 09 Jul 2005 16:52 GMT
The calculated value will be updated when the record is saved.

You can force the record to be saved with the RunCommand action.
In the lower pane of the macro design window, choose the SaveRecord
argument.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I am running a calculation based on a value that is entered into a control
>on
[quoted text clipped - 6 lines]
>
> Thanks
HelenJ - 09 Jul 2005 17:13 GMT
Thanks Allen - just what I was looking for

> The calculated value will be updated when the record is saved.
>
[quoted text clipped - 12 lines]
> >
> > Thanks
Mike Painter - 09 Jul 2005 17:01 GMT
> I am running a calculation based on a value that is entered into a
> control on a form (the calculation runs when a button is clicked)
[quoted text clipped - 4 lines]
> Is there any way (preferably through using a Macro since I am really
> struggling with the VB) to get this to happen

The result of a calculation should be displayed and not kept.

= [Quantity] * [price] in an unbound test box is one way.
TotalPrice:[Quantity] * [price] in a query is a better way.

While there are times when this approach is not suitable you should not
attempt to store a calculateed value until you know why you should *not* do
it.
HelenJ - 09 Jul 2005 17:14 GMT
Thanks Mike and yes I do understand that - this is not quite the situation
that you have described

> > I am running a calculation based on a value that is entered into a
> > control on a form (the calculation runs when a button is clicked)
[quoted text clipped - 13 lines]
> attempt to store a calculateed value until you know why you should *not* do
> it.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.