• Update Query data from form field (access 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Update Query data from form field (access 2000)

    Author
    Topic
    #394528

    I have three tables COMPANYTBL, PROJECTTBL, SOURCETBL – one form PROJECTFRM – one update query SOURCEQRY

    COMPANYTBL and PROJECTTBL are linked to each other via a field so that it is possible to see only the projects for a particular company when using PROJECTFM.

    SOURCETBL holds a preset number of records which need to be transfered to PROJECTTBL (I have done this using SOURCEQRY) whenever a new project is started.

    When a new project is started the data from SOURCETBL needs to be transfered to PROJECTTBL for the company which the project is for.

    The problem is when the update query is run, it does not fill in the field which links PROJECTTBL with COMPANYTBL.
    The query is run from a button on PROJECTFM which is filtered to show only one company’s record.

    Is there a way that I can get it to add the data from a field on PROJECTFM to a specific field in PROJECTTBL for each record that is transfered when SOURCEQRY is run? so that they are linked to the right Company.

    Viewing 1 reply thread
    Author
    Replies
    • #723796

      You state that SOURCEQRY is an update query, but I assume you mean an append query, since you use it to transfer records from one table to another.

      Open SOURCEQRY in design mode.
      In an empty column, enter Forms!PROJECTFRM!txtCompany in the Field: row, where txtCompany is the name of the control on the form that displays the company.
      In the Append To: row, enter the name of the company field in PROJECTTBL.

    • #723797

      You state that SOURCEQRY is an update query, but I assume you mean an append query, since you use it to transfer records from one table to another.

      Open SOURCEQRY in design mode.
      In an empty column, enter Forms!PROJECTFRM!txtCompany in the Field: row, where txtCompany is the name of the control on the form that displays the company.
      In the Append To: row, enter the name of the company field in PROJECTTBL.

    Viewing 1 reply thread
    Reply To: Update Query data from form field (access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: