Query Not Updating....asking for a parameter value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dryjeans
    New Member
    • Mar 2008
    • 24

    Query Not Updating....asking for a parameter value

    Hi,

    I'm trying to use the results of a query to set the value of a yes/no field...Here is the code I have, but it still asks for a parameter value...If I type in a correct value, it will update the yes/no box...but why is it not autmatically updating???

    "UPDATE [order] SET [order].[oversea order] = True WHERE [order].[order ID] = [Find duplicates for order].[order ID Field]"

    orderID = Text
    oversea order = yes/no
  • Stewart Ross
    Recognized Expert Moderator Specialist
    • Feb 2008
    • 2545

    #2
    Hi. You cannot refer directly to another table which is not included in the update query unless you use a sub-query to do so. I have recast your UPDATE to use the find duplicates query as a subquery below.
    [code=SQL]UPDATE [order] SET [order].[oversea order] = True WHERE [order].[order ID] IN
    (Select [Find duplicates for order].[order ID Field] FROM [Find duplicates for order]);[/code]

    -Stewart

    Comment

    Working...