Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Feb 2003
    Location
    England
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update Query data from form field (access 2000)

    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.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Update Query data from form field (access 2000)

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •