Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Jan 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update a record from a seperate form (Access 2000)

    What is the best way to update a currency field in a record when data is entered on a form based on a separate but related table.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update a record from a seperate form (Access 2000)

    Add the field to be updated to the query of your form
    Put this field on the form and make it invisible.
    In the after update event of the textbox where the data has to come from add

    Me!txtBoxtoBeUpdated = Me!txtBoxDataHasToComeFrom.
    Francois

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update a record from a seperate form (Access 2000)

    I don't know enough about your table structure but this looks like making a copy of data (or caclcualted value). Try not to duplicate data in your tables. It's better to get it from the original table when you require it.

  4. #4
    New Lounger
    Join Date
    Jan 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update a record from a seperate form (Access 2

    Thanks for your reply Andy. What I'm actually trying to do is have a client account field in one table which is updated when a sale is processed via a form bassed on another table. How would You do it?

  5. #5
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update a record from a seperate form (Access 2

    My comment was along the lines of:
    User enters 55 on one form which is then stored in a table. You then wanted to store the 55 in another table.

    If that is what you intend then you really ought to look the value up from the first table whenever you need it.

  6. #6
    New Lounger
    Join Date
    Jan 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update a record from a seperate form (Access 2

    Hi again Andy. Sorry I'm probably not explaining myself properly. User enters 55 in a field on a form based on table A. I then want to add the 55 to the numerical value already stored in a field in table B. The data will not be duplicated. Shane.

  7. #7
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update a record from a seperate form (Access 2

    If I understand you correctly you want to increment the value in a field in an existing record in Table B. If that is what you want then the value stored in table B is a calculated value. Then it is usually better not to store it but to calculate it whenever needed (use a query with grouping/summing, the sigma sign on the toolbar).

    If you want to store this value (55) in Table B then base your form on a query where Table A and Table B are linked, then your control on the form is based on the field in Table B.

    Does that make sense?

  8. #8
    New Lounger
    Join Date
    Jan 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update a record from a seperate form (Access 2

    Thanks for all your help Andy, I have now realised that what I need to be doing is using a querry when the data is required.Shane.

Posting Permissions

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