Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    South Carolina, USA
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Moving between forms and saving reocrds (2003)

    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!

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

    Re: Moving between forms and saving reocrds (2003)

    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

  3. #3
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    South Carolina, USA
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Moving between forms and saving reocrds (2003)

    Thanks!

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

Posting Permissions

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