update form on change of field used in expression

I have one form based on a table, which calculates the unit costs based on 
the total price and number of units received.  I created this form some time 
ago, and it works perfectly.  The moment I change the total cost or units, it 
updates the unit price field accordingly.

I created a similar form, also using an expression that determines the 
profit if sold at a price (the 'sold at' field).  However this form does not 
change the calculated field until I F5 or refresh.  I cannot see what I did 
differently in the original form, however would like this new form to update 
immediately when I change one of the fields the expression is based on.

Example of expression would be: =[Sold_at]-[UnitCost]

Thanks in advance for the help.
0
Utf
2/4/2010 9:37:01 PM
access 16762 articles. 3 followers. Follow

1 Replies
1341 Views

Similar Articles

[PageSpeed] 52

First, I would put the code on the after update event of both Sold_at and 
UnitCost.
When user updates either Sold_at or UnitCost, the calculated control should 
show the new profit.

Note that your post gives us very little information to use in trying to 
work out why it's not working.
Is this how you have set up the code?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"mtggal" <mtggal@discussions.microsoft.com> wrote in message 
news:908F7B5E-CDB5-46B1-BFDA-016D4EE8C33A@microsoft.com...
>I have one form based on a table, which calculates the unit costs based on
> the total price and number of units received.  I created this form some 
> time
> ago, and it works perfectly.  The moment I change the total cost or units, 
> it
> updates the unit price field accordingly.
>
> I created a similar form, also using an expression that determines the
> profit if sold at a price (the 'sold at' field).  However this form does 
> not
> change the calculated field until I F5 or refresh.  I cannot see what I 
> did
> differently in the original form, however would like this new form to 
> update
> immediately when I change one of the fields the expression is based on.
>
> Example of expression would be: =[Sold_at]-[UnitCost]
>
> Thanks in advance for the help. 


0
Jeanette
2/4/2010 11:15:16 PM
Reply:

Similar Artilces:

Using part of a cell in a chart title
I have a chart which should get a title. However, this should be partly be used from a cell e.g. "counted with 5%" 5% should be taken from the cell and used in the title. Is this possible? Hi, Yes it's possible but all of the chart title needs to be in the cell. So you may need to use a helper cell and concatenate text and value. http://www.andypope.info/tips/tip001.htm Cheers Andy -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info "Nicole" <Nicole@discussions.microsoft.com> wrote in message news:5CB7A971-AA7F-4C34-BB42-7DC283AA2958@micro...

Input Excel 'Password to Open' through control in access form
Hi All, We know,Excel has prompt password to open it files. Is it possible to create a code that can supplies the excel prompt password?.So that when we open the excel file through our access control in a form, the excel files can be opened automatically.But when the excel files opened from its default icon,it will prompt a password first. ...

Sort ascending, make changes, restore previous order
I've got an AutoFilter in a spreadsheet. I want to sort ascending, mak some changes to some cells, then restore the previous order. Can thi be done easily or will this require some programming?? Thanks in advane! Matt -- BVHi ----------------------------------------------------------------------- BVHis's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=859 View this thread: http://www.excelforum.com/showthread.php?threadid=47508 I'd use a helper column. Put =row() and drag down. Convert it to values (edit|copy, edit|paste special|values) Do all y...

How do you change the background color of a picture?
I have a image that I have copy and pasted, however I want to fill behind the image. I know how to fill and all that, my problem is that it recognizes the entire image as a picture, I was wondering if there is a way to change the background while the image lays on top? sureisdifferent wrote: > I have a image that I have copy and pasted, however I want to fill > behind the image. I know how to fill and all that, my problem is that > it recognizes the entire image as a picture, I was wondering if there > is a way to change the background while the image lays on top? =============...

SRS Invoice Report
Hi all, Please help me i would like to pull a field Vat Number field from the Account record for the invoice. It doesnt pull through when i run a report, however if i put it in the contact record it is pulled. What am i doing wrong, here is my code. SELECT TOP (1) FilteredInvoice.name, FilteredInvoice.statecodename, FilteredInvoice.totalamount, FilteredInvoice.customeridname, FilteredInvoice.invoiceid, FilteredInvoice.shipto_city, FilteredInvoice.shipto_country, FilteredInvoice.shipto_fax, FilteredInvoice.shipto_freighttermscode, Filt...

Exchange update problem
I have tried to upgrade exch2k3 sp1 to sp2, but the update fails with "the file pcproxy.dll is in use, and setup cannot identify the app or srvc. setup cannot continue" Any clues/ideas/suggestions? Please. -- ----------------------------------------------------------------------------------------------------------------------- This message has been checked for all known viruses. The information contained in this e-mail and any attachments is confidential and may be the subject of legal, professional or other privilege. It is intended for the named addressee only and may not ...

how do I automatically update a text box in a chart?
Hi, You can link the textbox to a cell. When you update the cell the textbox should reflect this. Select the textbox border and then in the formula bar enter the complete cell reference, for example, =Sheet1!A1 Cheers Andy Kath wrote: -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info ...

Inserting form values into a table
We have a form with values taken from an sql query that comes from two different tables. We would like to enter the information into a third table. Can some one direct me to code that will do the following: 1. Provide the Insert sql that shows us how to add the form values to the table 2. Show us how to loop while inserting the information into the table (there could be several lines on the form, each must be inserted one at a time). I have worked with Access before and have never had a problem inserting information. However, I cannot quite figure out how to insert informtion through an ...

Outlook needs Outlook Express to work
I've installed my Outlook 2002 on my new Vista PC (I had Xp before). Now when I start Outlook it says "requires Outlook Express 4.01 or greater". I've been looking for Outlook Express to download and install but no joy. No CD came with my new Vista PC. Any ideas, short of buying a more modern Outlook? Vista doesn't actually support Outlook 2002 or older. Outlook Express is part of Internet Explorer but with the advent of Vista, it was switched to Windows Mail. There is no more Outlook Express. You could attempt however to create a profile using workgroup or c...

Address book updating...
Hello all, I have noticed since we moved to Exchange 2003 that it takes a long time (several hours) before I see newly created accounts in the address book. Is there somewhere I can adjust the update time? TIA, Gary Check the update interval in the RUS (Recipient Update Service). Teo "GaryH" wrote: > Hello all, > I have noticed since we moved to Exchange 2003 that it takes a long time > (several hours) before I see newly created accounts in the address book. > Is there somewhere I can adjust the update time? > TIA, > Gary > > > Thank you...I will ...

Before Update on record select
I am getting no where fast. I have a main form and sub form and what i need is a message to appear when user moves on to the next record using the record selector on the bottom of the form. I have tried the beforeupdate on the form but no results. Can form design prevent a message prompt? One problem is that if no changes to the current record have been changed, the Before Update event will not fire. If you do make a change, the code as is should work. I have gotten into the habbit of not using the standard record navigators, but write my own so I can easily deal with this. -- Dave Ha...

New Disk storage
Hi, I'm planning on adding a new SAN to our Exchange system (Active/Passive 2 node cluster) and this has been connected to the Exchange cluster nodes and is accessible as shared disk storage. But that isn't the question I've got, basically the mail stores are currently located on a Powervault (Drive S:) and I need to present a plan for moving this data (14 databases) onto the SAN storage, I can see two options Option1) Use the ESM to migrate databases to new drive letter 1. Use exmerge to export all email to PST files (and ensure backup) 2. use the ESM utility to change the...

Using expression builder object
Hi, I'm developing a wizzard in Access which builds import templates for various data sources to a fixed set of tables. In step 3 the users must be able to build an expression ; for instance Left([Fieldx],20) . Now I would like to have a command button on my form which calls the Access expression builder to allow the users to use this to build the expression. This expression will then be stored in a text box linked to the templates table. Anybody know how to call and use this object from VBA code? -- Kind regards Noëlla DoCmd.RunCommand acCmdInvokeBuilder I th...

Change File Locations to Private Drive (not Folder)
Hi, I know that I can use "File Locations" in "Options" so that whenever I use the "Open..." command in Word, it will open to a specific folder. I'm wondering if there is a way that this can be applied not to a folder but to a specific drive on a network. Our company has a main public drive and has also assigned each of the Staff their own private drive. Is there a way to access the "main page" (for lack of a better term) of my private drive each time I use "Open..." in Word? Right now it goes to "My Computer" or ...

How to change font size on formula bar in Excell 2007
I don't find Tools>Options>General (as suggested in other post answers) in Excel 2007. On the Office button there is an Excel Options but it doesn't provide a method of changing font size on the office but. My font is so small I can barely see it. Office button>ExcelOptions>Popular tab>in the "When creating new workbooks" section, choose font and font size -- Kind regards, Niek Otten Microsoft MVP - Excel "jimwillie" <jimwillie@discussions.microsoft.com> wrote in message news:588AAC05-0F52-404E-AA01-128E70E02D0B@microso...

How do I use traffic lights in excel
I am wanting to use traffic lights in excel that change colour based on the result of a variance cell, ie if the result of the cell is 10 make the traffic light green, if it is 20 make the traffic light amber, if the result is 30 make the traffic light red. How do I do this? Shorty Format>Conditional Formatting>Cell Value is: Note: you can add up to 3 conditions(4 if you count default) Gord Dibben Excel MVP On Wed, 22 Dec 2004 16:35:03 -0800, Shorty <Shorty@discussions.microsoft.com> wrote: >I am wanting to use traffic lights in excel that change colour based on the &g...

Find prev record on other requeried form
Using access 2003. I have a main form for name and address info. A subform shows limited info on client placement. Click a command button on the main form and user opens another form for full screen entry of placement data. That form opens showing the client selected on the initial main form. When the full screen placement form closes, it requeries the original main form with the placement subform to show the added placement. It goes to the first record in the table though. It does not show the original client whose placement was just added. How do I set the mai...

Filter recordset using query results
Hi all I have a form based on a query called [qry Quarterly Planning], it lists all Itineraries on the system. On this form you can filter records by specifying a Start and End Date for the [ReviewDate] and/or [Specialist]. It is a subform on a main unbound form, lets call this Subform1. Along side this I have another subform (Subform2) which displays ReviewDates that exist against an Itinerary. In other words Subform1 has a start date of an activity and if the activity lasts longer than 1 day, then the additional dates are stored in Subform2 (ItineraryDates). Currently when I...

How can I change 'Normal' Style for Word e-mails to 'Normal (Web)'?
Hi, I'm using Word as my e-mail editor in Outlook 2003 and want to change the default Style for e-mails from 'Normal' to 'Normal (Web)'. The problem is that new e-mails and replies in HTML format use the 'Normal' Microsoft Word 'Style', and this has no gap after paragraphs. The upshot of this is that when sending an e-mail, I have to press return twice to create a gap, but when the recipient views this, their software shows it as four gaps (the extra carriage return I typed + their correctly viewed HTML carriage return after each line). E.g. I type this: ...

adding name /creating field/query?
Hello, I can create an invoice_number field in a query using the primary field ID from the main table as invoice_number: ID but if ID say is 100, I cannot work out how to create renewal_invoice_100 Cheers Geoff Geoff We aren't there. We can't see what you're looking at. Where did "renewal_invoice_100" come from and what does it mean? Please post the SQL statement of the query you are trying to use. -- Regards Jeff Boyce www.InformationFutures.net Microsoft Office/Access MVP http://mvp.support.microsoft.com/ Microsoft IT Academy Program Mentor http://micro...

Calculating age in a label or text box on a form
Hello All, I have a text box for birthdate for a user to enter the birthdate and I want to the age for the user to be automatically calcuated and displayed in another label called "Age." What formula can I use? Missy ...

Newbie Question: Using Web Services
Hello All. I've been trying to implement Infopath with CRM with no success. I've tried the example, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmbscrm1_2/html/mbs_crminfopathcrmintegration.asp, to no avail. I have followed the example to the letter, but find the information about publishing the Web Service to the server to be somewhat lacking. Admittedly, I am not a programmer, and I am continually running into an error in line 54: xmlDoc.LoadXml(objQuery.ExecuteQuery(objBizUser.WhoAmI(), strAllAccountsFetchXML)); Has anyone else ...

how do i change colour of scroll bar in worksheet
I find it very difficult to see the scroll bar in my excel workshhet as they are white, can they be changed to a colour and if so how ? Are the scrollbars white in other applications? In win98, I could change some display settings, but I couldn't change the scrollbar colors. But if the scrollbars aren't white in other applications, then this can't be the solution. Jayne wrote: > > I find it very difficult to see the scroll bar in my excel workshhet as they > are white, can they be changed to a colour and if so how ? -- Dave Peterson In word they are, but not on a...

Outlook Express 6 w/multiple accounts
I have three accounts set up in Outlook Express 6. Two of them work fine, but when I reply to or forward a message sent to the third address, it uses the second address in the "from" line, so I have to change it manually. This does not happen with the other two. How do I fix this? ...

outlook 98 corperate forms
In a corperate environment, Outlook 98 forms not active for using on some of the PCs. Why it happens? How can I solve this problem. ...