Results 1 to 3 of 3
  1. #1
    Brian_45 is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2010
    Posts
    3

    Can update from query, but not from form?

    Alright, this has me stumped. Here we go...

    I have a form that if I open it from the main switchboard, I can edit the records fine, but if I open it from a search form the record is not updateable (the form is filtered. But unfilitering the form doesn't help). AllowEdits is set to true on the form.

    The form does use a query for it's data, but the recordset is perfectly updateable from within the query.

    Here is the code I am using to open the form from the search grid:

    Private Sub SalesOrder_Click()
    [Forms]![SearchTrResults].[SalesOrder] = Me.SalesOrder.Value


    DoCmd.OpenForm "JobsForm", , , "SalesOrder = Forms!SearchTrResults.SalesOrder"
    DoCmd.Close acForm, "SearchTrResults"
    End Sub

    I have the recordset type set to Dynaset (inconsistent updates) in both the form and query.

    There are no linked tables involved in the query and the query is merely calling all of the fields from a particular table. Here is the query:

    SELECT tblJobs.*
    FROM tblJobs
    ORDER BY tblJobs.Status DESC , tblJobs.PeriodStartDate DESC;

    I actually have two forms doing this, but the problem has to be the same because the circumstances are identical.

    This is driving me nuts. Please help!

    Thanks,

    Brian

  2. #2
    Brian_45 is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2010
    Posts
    3
    Changed the OpenForm code a bit and still no worky

    Private Sub SalesOrder_Click()
    [Forms]![SearchTrResults].[SalesOrder] = Me.SalesOrder.Value
    DoCmd.OpenForm "JobsForm", acNormal, , "SalesOrder = Forms!SearchTrResults.SalesOrder", acFormEdit
    DoCmd.Close acForm, "SearchTrResults"
    End Sub

  3. #3
    Brian_45 is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2010
    Posts
    3
    I figured it out!

    I had the search grid set with record locks to all records. That was apparently carrying over to the jobs form even after the search form was closed. Weird, but it's fixed!

    Hopefully this post will help out some poor frustrated soul in the future!

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

Similar Threads

  1. Replies: 1
    Last Post: 09-05-2010, 11:28 AM
  2. Run Update Query on Current Record in Form
    By c3pse in forum Queries
    Replies: 3
    Last Post: 08-14-2010, 05:40 AM
  3. Form doesn´t update with Query.
    By disturbedgod in forum Forms
    Replies: 10
    Last Post: 02-09-2010, 02:00 PM
  4. Update Query- selective update?
    By stephenaa5 in forum Queries
    Replies: 1
    Last Post: 10-29-2009, 11:15 AM
  5. Update Query from Form
    By ste_pie87 in forum Queries
    Replies: 2
    Last Post: 04-26-2009, 07:22 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