Results 1 to 7 of 7

Thread: how to update records through Forms

  1. #1
    New Member
    Join Date
    Oct 2019
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default how to update records through Forms

    Hello Everyone I'm Trying to Update my records through the form i created.
    not sure if its VBA or not!
    so any idea ?!

  2. #2
    Board Regular
    Join Date
    May 2013
    Posts
    666
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Default Re: how to update records through Forms

    Just bind the controls to the source data and it will do it for you.

    Use the form wizard to create a form when on the table or query that will be the recordsource for the form.
    Office 2007
    Access novice. Sometimes trying to give something back

  3. #3
    Board Regular
    Join Date
    Jun 2015
    Location
    Ontario, Canada
    Posts
    1,723
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Default Re: how to update records through Forms

    In addition to binding, it mighty be worth mentioning that in order to commit changes or additions to a form's set of records, you have to do something to cause the change to be committed. This could be any one of
    - moving off the record; e.g. going to next or previous if a single record form or going from one record to another in a datasheet or continuous form
    - moving off the form; e.g. clicking off a main form onto a subform or vice versa, when fields on one have been updated and you click on the other
    - closing the form or database (relying on this to save a record isn't the best approach)
    - using code to update or commit the record, such as when using a command button.
    Tips for posting problems:
    1) "doesn't work" doesn't help. Post error message text/numbers and/or state what's happening.
    2) if posting code or sql, use code tags; specify on which code line errors occur, if applicable
    3) try to be specific; assume we know nothing about your issue - because we don't!

    Make all suggested changes in copies of your database or to its objects.

    "1 out of 1010 people understand binary. The other 1001 don't."

  4. #4
    New Member
    Join Date
    Oct 2019
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: how to update records through Forms

    thank you so much for your answers! what you are doing to the community is extremely helpful :D

    Mr.Micron you seem to be a master at access, the phrase = "you have to do something to cause the change to be committed" Is exactly representing my case.
    i would say my problem will be solved using the 4th method that you mentioned "
    - using code to update or commit the record, such as when using a command button."
    I've been stuck for 3 days now because i don't know the coding in VBA to solve my problem.
    if you have the time and effort i would be really glad if you could help me in generating this code which updates the records automatically when filling in the input in the form.
    i also
    apologize for my poor elaborating skills i'm not really an expert in these kind of stuff
    Thank you Sir and have a great day!

  5. #5
    Board Regular
    Join Date
    Jun 2015
    Location
    Ontario, Canada
    Posts
    1,723
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Default Re: how to update records through Forms

    You would have to provide details about the form design and its recordsource. Start with the latter - is it bound or not?
    Then,
    is it single record view,
    datasheet or continuous,
    main form and subform and what type is the subform
    or something else?

  6. #6
    New Member
    Join Date
    Oct 2019
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: how to update records through Forms

    Hello! and happy Monday :D
    The details are the following:
    I have 2 tables and 1 Form!
    I'm Pulling the data From table 1 through the form i have and then save it in table 2 (documentation).
    i think the code is something like this OpenRecordset(Select * From Table 1 Where Customer number = Etc.)

  7. #7
    Board Regular
    Join Date
    Jun 2015
    Location
    Ontario, Canada
    Posts
    1,723
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Default Re: how to update records through Forms

    A bit confused. In your post you wanted to know how to update records. Now you are saying you want to append records to another table (this is not updating) yet you seem to have these records in a table already. Perhaps you shouldn't be doing this, so I'll ask why you are copying from one table to another. Details on what's going on?

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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