Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Value & Open Report (2003)

    I have created a form, and there are two things I want to do but can't. One of the fields is set to limit to list, and is taken from another table. If what is typed in, isn't in the list, it can be added. What I've been asked for is to put a default value in, which can be changed. I typed in a default value, but I get an error. Is this because the value is taken from another table. I tried putting the default value in the other table, but that didn't work either.
    Also, one of the fields is a report number. I want to add a button which will open a pdf report which will be named the same as the report number, but don't know how to do it.

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

    Re: Default Value & Open Report (2003)

    Say that the combo box is named cboSomething, and you want the first item in the list to be the default value. Set the Default Value property of the combo box to
    <code>
    [cboSomething].[ItemData])0)
    </code>
    (The item index starts at 0, so 0 is the first item, 1 is the second item etc.)

    About your second question: you can use FollowHyperlink (see <post:=431,134>post 431,134</post:>) or the Windows API function SheelExecute (see <post:=201,988>post 201,988</post:>).

  3. #3
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Default Value & Open Report (2003)

    Thanks Hans. I used the follow hyperlink, and it works, but I get a warning about Hyperlinks being harmful. Can I stop this?

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

    Re: Default Value & Open Report (2003)


  5. #5
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Default Value & Open Report (2003)

    Thanks Hans, that's marvellous. Thank you for all your help and patience this past year. Merry Christmas and Happy New Year.

Posting Permissions

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