Results 1 to 4 of 4
  1. #1
    AusStiffler is offline Novice
    Windows 2K Access 2002
    Join Date
    Oct 2010
    Posts
    2

    Edit Data and Recalculate WITHIN THE FORM ONLY


    Hi,

    I have created a form populated from an underlying database. I have an unbound text box on the form [totalCostPrice] that calculates data from 2 other bound text boxes. eg: [unitprice]*[quantity]. I need to be able to change the unit price on the form only and recalculate the result WITHIN THE FORM ONLY and not the underlying database. I keep getting the error ODBC --call failed. []MYOB ODBC] functionality not supported. (#0). It seems to be requerying the underlying database even if I provide an event procedure me.recalc on lost focus. Can you please provide a solution asap?

  2. #2
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    I would add an extra (unbound) field for the editable unit price and then hide the current one. Use OnCurrent to set the value of the unbound field to match the hidden one and set the calculation to use the unbound field.

  3. #3
    AusStiffler is offline Novice
    Windows 2K Access 2002
    Join Date
    Oct 2010
    Posts
    2
    Thanks Slave138,

    Seems to work however when I use the following:

    Private Sub Form_Current()
    Me.UnitPriceUpdated = Me.TaxInclusiveUnitPrice

    End Sub

    The result generated by (taxInclusiveUnitPrice) to the unbound textbox (UnitPriceUpdated) is filled with the value from the top row only.

    eg; [TaxInclusiveUnitPrice] [UnitPriceUpdated]
    Row 1 = $7:00 $7:00
    Row 2 = $15:00 $7:00
    Row 3 = $27.50 $7.00
    Etc ...

    I am obviously overlooking something ...do you have a possible solution?

    Cheers!

  4. #4
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    I need a little more info about the form you are using. What kind of a layout are you using? A screen shot of the form or a sample DB would help.
    Last edited by slave138; 10-19-2010 at 10:28 AM.

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

Similar Threads

  1. How to edit data in a form
    By x3ldonx in forum Forms
    Replies: 2
    Last Post: 10-11-2010, 01:20 AM
  2. UnMatched Data Query (Edit Data)
    By pedraza4 in forum Queries
    Replies: 3
    Last Post: 06-16-2010, 07:29 AM
  3. Replies: 4
    Last Post: 05-17-2010, 05:32 PM
  4. Replies: 3
    Last Post: 07-30-2009, 07:12 AM
  5. Most reliable way to edit form data in VBA...?
    By samalter in forum Programming
    Replies: 0
    Last Post: 06-23-2006, 12:39 PM

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