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

    Dynamic Form Content (2003 SP2)

    I have one data entry form with the subform, and a menu form with command buttons. The data entry form will be used for three different purposes: private data, corporate data, and service data. I've created three separate command buttons on the menu form for opening the data entry form. How do I make the data entry form change heading and sub-form source object according to the selected command button?

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

    Re: Dynamic Form Content (2003 SP2)

    You can pass a string in the OpenArgs argument of DoCmd.OpenForm, and you can check OpenArgs in the On Open or On Load event of the data entry form:

    Select Case Me.OpenArgs
    Case "Private"
    ...
    Case "Corporate"
    ...
    Case "Service"
    ...
    End Select

  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: Dynamic Form Content (2003 SP2)

    Thanks Hans - it worked perfectly.

Posting Permissions

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