• Moving between forms and saving reocrds (2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Moving between forms and saving reocrds (2003)

    • This topic has 2 replies, 2 voices, and was last updated 17 years ago.
    Author
    Topic
    #449731

    I have a main form where the user can enter demographic information about a customer. On the form, I have a button that will take them to another form, display some demo information such as name (from the previous form) and allow them to add product information for that customer.

    If the customer is already saved, it works fine. The information on the 2nd form is displayed (basically this is to verify that we are adding to the right person) and then you add the product. Works great.

    If I am creating a customer for the first time and I click the button …. the information does not show up on the 2nd form. I can close that form and I notice that I am still in editing mode on the first screen. I can not get it to save the data first and then open the 2nd form. What am I doing wrong?? I would like to do this in one click…save the record and open the 2nd form and display data.

    I know I have done this in the past with earlier version….

    Please help!

    Viewing 0 reply threads
    Author
    Replies
    • #1103460

      Add the following code in the On Click event procedure of the button above the line with DoCmd.OpenForm:

      If Me.Dirty Then
      RunCommand acCmdSaveRecord
      End If

      • #1103463

        Thanks!

        I looked at the dirty command yesterday but was not sure about process.

    Viewing 0 reply threads
    Reply To: Moving between forms and saving reocrds (2003)

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

    Your information: