Results 1 to 4 of 4
  1. #1
    Wrangler is offline Wrangler
    Windows 7 Access 2007
    Join Date
    Dec 2005
    Location
    Alabama
    Posts
    17

    I need to update a data field on a form and not on its table

    I am doing an Invoice database; I have a form that works great, it has a subform that looks up the products. I would like to be able to use the drop-down field in the sub form so that if it teh Status column has "In stock" the total price will equal "Quanity*UnitPrice" other wise "Total Unit Price" will equal $0.00.



    Can I do a statement like:

    = If Status = "In Stock" then
    Total_Unit_Price = Quantity*UnitPrice
    Else Total Unit Price = "0"
    End If

    If I can do this where would I do it and how?

  2. #2
    Join Date
    Dec 2005
    Location
    Wilmington, DE - USA
    Posts
    275
    Put this in the controlsource:

    =IIf([Status] = "In Stock", [Quantity] * [Price], 0)

  3. #3
    Wrangler is offline Wrangler
    Windows 7 Access 2007
    Join Date
    Dec 2005
    Location
    Alabama
    Posts
    17

    Now All I get is $0.00

    I put in =IIf([Status] = "In Stock", [Quantity] * [Price], 0). NOw all the Total price is $0.00 no matter what the Status is.

  4. #4
    iball1113 is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2013
    Location
    San Antonio, TX
    Posts
    9
    If you make the update on the form, it automatically updates the table.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Data won't show up in table field
    By texzen123 in forum Forms
    Replies: 3
    Last Post: 11-26-2009, 11:20 AM
  2. Extra date field update
    By georgft in forum Forms
    Replies: 0
    Last Post: 09-17-2008, 06:51 AM
  3. Replies: 1
    Last Post: 08-04-2008, 03:30 AM
  4. Replies: 0
    Last Post: 04-17-2008, 09:24 AM
  5. Update table from calculated field in a form
    By BernardKane in forum Forms
    Replies: 3
    Last Post: 11-28-2006, 09:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums