Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Location
    Sydney
    Posts
    2

    Unanswered: Browse button on a form

    I have a field on a form to add an attachment. A user can type in the name of the attachment without any troubles, but I need to ad a browse button which will return the name of a document when selected...not quite sure where to start...

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    I'll send you an example

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    presuming you are storing the attachemnt somewhere, say in a column called PathToAttachement thne you could place your browse button and a fucntion in your form which either makes the browse button visible/invisible OR Enabled/Disabled.

    the function call goes in the forms on current event, the detail on change event

    the function is soemthing like
    private sub SetBrowseState()
    'depends what checking you wish to do, there are various alternatives...
    'a crude if the variable has more than n characters
    <mybrowsebutton>.enabled = len(<mycontrolnamecontainingthepath>) >n
    'you could check the file exists (would be smarter)
    'you could check the file exists and is valid before opening it (even smarter)
    end sub
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Here is an example using API call to browse your computer for a folder. For example to store export file or ....
    Attached Files Attached Files

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    hambakka's api call will ge breat for ensuing that your usrs can only select files of a specific type.
    thats simplifies your problems
    you now only need to check the file exists since the user specified it
    and then display is as a hyperklink, or set some properites in your buttons on click event that opens the file with the correct applciation.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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