Results 1 to 4 of 4

Thread: Updating Record

  1. #1
    Join Date
    Dec 2011
    Posts
    9

    Unanswered: Updating Record

    Hello
    I have a form where I can enter a new record. on this form there is a button to open a new form where you can enter information related to the record. The first form's record source is a table. The second form's record source is a query with data from the first form's table. My problem is that after I enter a new record and click on the button to get to the second form, the new record information does not show on the second form. Is there a way to update the record immediately after I input it without saving or closing the form. I have tried doing different refresh or requery commands but it doesn't seem to work. Thanks for any help.

  2. #2
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    119
    You wo't be able to see it unless you save ity bercause technically it isn't there.

    So to save it just add the following line of code before the open command:

    DoCmd. RunCommand acCmdSaveRecord

    (but with no space betwen the . and Run)
    Regards
    JD

    Software-Matters

  3. #3
    Join Date
    Dec 2011
    Posts
    9
    Thank you very much! That was very helpful. As an addition to my question the button is in a subform,and it saves those records perfectly. My other question is if there is a command to save the records from the form as well?

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    In the Form module:
    Code:
    Me.Dirty = False
    Have a nice day!

Posting Permissions

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