Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Sydney, New South Wales, Australia
    Posts
    216
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Populate Values (Access 2003 SP3)

    I want to open a pop-up form from a command button on a sub-form and automatically assign or rather copy values from fields on the main form. For example, I want both name and date field contents to reappear on the pop-up form. What's the best way to do this please?

    Thanks

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

    Re: Populate Values (Access 2003 SP3)

    You could use the On Load event of the popup form and check whether the main form is open; if so copy some values from it:
    <code>
    Private Sub Form_Load()
    If CurrentProject.AllForms("frmMain").IsLoaded Then
    Me!txtName = Forms!frmMain!txtName
    Me!txtDate = Forms!frmMain!txtDate
    End If
    End Sub
    </code>
    You must substitute the correct names, of course.

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Sydney, New South Wales, Australia
    Posts
    216
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Populate Values (Access 2003 SP3)

    Thanks Hans

Posting Permissions

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