locked
VBA to run update query using value from form to update table RRS feed

  • Question

  • Hello, I am new to Access and VBA and am having trouble trying to get an update query to run the way I want. I think I will need to use some VBA.

    I have a table with one of the main fields is gender (male or female). On my form, I have a gender dropdown combo box, with two input options. The first is the Group field, which is a combo box with either "A" or "B" options. The final is a text box where the end user can input the actual amount.

    I am looking to have the button update my table with the selections of "Group" and "Amount" on the records associated with the "Gender". Is this easy to do?

    Monday, May 7, 2018 6:04 PM

All replies

  • Hi Gillyr7,

    There is no necessary to write the VBA. In this scenario, a simple form could works well. 

    Here is a demo to help you get started:

    1. Create a table with fields Id, Name(Short Text), Gender( LookUp & releationship, input the value like male, female), Group( LookUp & releationship, input the value like A, B), Amount( Numbers)

    2. Create a form for the table

    Here is an helpful article about creating form for you learning:

    Create a form in Access

    Please let


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 8, 2018 3:15 AM
  • Hi Gillyr7,

    If you still have the problem about this issue, please feel free to let us know.

    Regards & Fei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, May 31, 2018 8:48 AM