Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Aug 2005
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Setting default value (Access 2000)

    I want to set a default value of several forms by choosing from an option box. My function is :
    Private Function MyDefault()
    Dim Thedefault As String
    The Default = Me!office
    DoCmd.OpenForm "Form1", acDesign
    Forms!Form1!office.DefaultValue = Thedefault
    DoCmd.Close acForm, "Form1", acSaveYes
    However i get the message that the function is not defined pointing to the line The Default = Me!office
    How can i correct my function ?
    Attached Files Attached Files

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Setting default value (Access 2000)

    On this line you have a space in Thedefault

    The Default = Me!office
    Regards
    John



  3. #3
    2 Star Lounger
    Join Date
    Aug 2005
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Setting default value (Access 2000)

    Thank you so much !

Posting Permissions

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