Results 1 to 4 of 4
  1. #1
    Bwilliamson is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    Greenville, SC
    Posts
    8

    Edit Data in Recordset

    I need some guidence on updating some data in a recordset.

    Basically what I am trying to do is have the user enter an amount in the PhyPctComp field ( which is a raw field from a table, no calcualtions) and have the fields after it in the query recalculate the totals in them based from the amount entered by the user. They have requested this be in a datasheet view, not a regular form view.

    So say the user inputs a percent complete of 50%, it will then take the totals from other fields and recalulate $ and hours based from how much of the job is complete.

    I can't figure out how to get this to happen. Also I'm having trouble making the Percent complete field editable when it is bound. If I make the field unbound it changes the values for every entry.



    Just can't seem to slove this and I would appreciate some direction.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Maybe this link will help with part of your problem: http://allenbrowne.com/ser-61.html

  3. #3
    Bwilliamson is offline Novice
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    Greenville, SC
    Posts
    8
    Quote Originally Posted by RuralGuy View Post
    Maybe this link will help with part of your problem: http://allenbrowne.com/ser-61.html

    I appreciate the help. The issue was due to the form having a control source of a query. I worked around it by creating a temp table, then clearing it and requerying it at the On open event.

    Code:
     
    Private Sub Form_Load()
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "qry_Delete_working", Datasheet, Edit
    DoCmd.SetWarnings False
    DoCmd.OpenQuery "qry_Forecast_Master_Lab", Datasheet, Edit
    DoCmd.Requery "frmWorking_Lab"

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad to hear you got it sorted. You do know that it was *not* because the RecordSource was a query but that the query had ambiguous records, right? I use queries with joins all the time that are updateable.

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

Similar Threads

  1. Edit Data and Recalculate WITHIN THE FORM ONLY
    By AusStiffler in forum Forms
    Replies: 3
    Last Post: 10-19-2010, 04:32 AM
  2. How to edit data in a form
    By x3ldonx in forum Forms
    Replies: 2
    Last Post: 10-11-2010, 01:20 AM
  3. UnMatched Data Query (Edit Data)
    By pedraza4 in forum Queries
    Replies: 3
    Last Post: 06-16-2010, 07:29 AM
  4. Replies: 1
    Last Post: 11-13-2009, 03:03 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