Recent content by Chris115

  1. C

    Update query not pulling criteria from form

    I moved the DoCmd.OpenQuery to above the On Error line and it's worked!! Many thanks for you help. Am I correct in presuming that it was clearing the combobox when it was going to a new record, so was just the order in which I'd built my macro?
  2. C

    Update query not pulling criteria from form

    Ok, I've tried your code but no error messages. It displays the message box saying "Disposal successfully saved" so think it must be getting that far. But it still doesn't update the table. It must be trying to run the query as if I edit the SQL statement to hardcode in "R001" it definitiely...
  3. C

    Update query not pulling criteria from form

    Yes, Asset ID has a Data Type of Text in the 'Assets' table. The control name (also called Asset ID) has Control Source: Asset ID Row Source: SELECT Assets.[Asset ID] FROM Assets; But I can't see a format type on that actual combobox control?
  4. C

    Update query not pulling criteria from form

    Slight error in my last post, it doesn't come up with the Enter Parameter Value box after I corrected a typo! However, it still doesn't update the Status field in the Assets table, even with the .[text] at the end of the SQL statement. Am I missing something obvious? I've tried printing a...
  5. C

    Filtering 'All' from Combo box Value List

    Thank you, that's worked perfectly!
  6. C

    Filtering 'All' from Combo box Value List

    Hi I have a combo box on a form which has a row source type of Value List in which I've manually typed in 2 entries: Owned, Leased. I have a query which filters on the results of the combobox, and works fine for when I select either option Owned or Leased. Is there an easy way to filter all...
  7. C

    Update query not pulling criteria from form

    Thanks JHB but when I change the query to add the .[Text], it comes up with the Enter Parameters Value box after I run the command button entry. (If I enter the asset ID in there, e.g. R001, it does then update the table, but I would like to do it without this input box). I've converted the...
  8. C

    Update query not pulling criteria from form

    What does the Me. line do? How does it know how to update the 'Status' field in the 'Assets' table? No matter where I put it in the SQL in the query I can't get it to work. I can't see a SetValue command in the Macro builder in the command button event, is it the SetLocalVar? Apologies for...
  9. C

    Update query not pulling criteria from form

    My current SQL query looks like this: UPDATE Assets SET Assets.Status = "Disposed" WHERE (((Assets.[Asset ID])=[Forms]![Disposals Entry]![AssetID])); I've tried replacing it with Me.[Status Asset ID] = "Disposed" but don't think I have the correct syntax?
  10. C

    Update query not pulling criteria from form

    You are probably not missing anything as I'm still trying to get to grips with the basics. Would the Me.[Status Asset ID] = "Disposed" code line go in my event on the command button? I've produced this using the macro builder, so not sure how/where to put it. OnError Goto Next...
  11. C

    Update query not pulling criteria from form

    Thanks for the tip, I've tried the printing the results in the immediate and window and it looks correct, as it returns: R001 (which is the Asset ID). However, the Status field on the Assets table still doesn't update. I'm expecting the Status to update to "Disposed", but it still says "1st...
  12. C

    Update query not pulling criteria from form

    Hi, i'm new to access so please bear with me! I'm trying to update a record in a table, from a query that is run as part of an event from a command button on a form. I have a table called 'Assets', a table called 'Disposals', and a form called 'Disposal Entry'. I would like the user to...
Back
Top Bottom