wordpress statistics
  • Today is Friday, May 18, 2012

12 Responses to “FILE BROWSER IN MSACCESS”

  1. Aécio Lemos says:

    I know you posted this some 3 years ago but a client of mine needed maintenance in an Access application and this saved me a lot of time. Thank you for the tutorial and the SIMPLE way of making this work. Other tutorials were huge.

    Thanks again!

  2. You may try the following Code, if you are using MS-Access 2003. This sample code you can find on the Code Module of Employees Form in NorthWind.mdb database. The Program is run from the Add/Remove Button click on the Form.

    Private Sub AddPicture_Click()
    ' Use the Office File Open dialog to get a file name to use
    ' as an employee picture.
    getFileName
    End Sub

    Sub getFileName()
    ' Displays the Office File Open dialog to choose a file name
    ' for the current employee record. If the user selects a file
    ' display it in the image control.
    Dim fileName As String
    Dim result As Integer
    With Application.FileDialog(msoFileDialogFilePicker)
    .Title = "Select Employee Picture"
    .Filters.Add "All Files", "*.*"
    .Filters.Add "JPEGs", "*.jpg"
    .Filters.Add "Bitmaps", "*.bmp"
    .FilterIndex = 3
    .AllowMultiSelect = False
    .InitialFileName = CurrentProject.path
    result = .Show
    If (result <> 0) Then
    fileName = Trim(.SelectedItems.Item(1))
    Me![ImagePath].Visible = True
    Me![ImagePath].SetFocus
    Me![ImagePath].Text = fileName
    Me![FirstName].SetFocus
    Me![ImagePath].Visible = False
    End If
    End With
    End Sub

    You may modify it to suit to your requirement.

    Regards,

  3. Dracula77 says:

    I like the form but it doesnt work, it gives me the error message" object doesnt support this property or method"
    thanks.

  4. Anonymous says:

    Hi – could you add a demo database of your browser lesson to your site? Having a demo version to compare to my own would be really useful!! Thanks.

  5. Anonymous says:

    Hi,

    Thanks a lot!

    The MS-Access 2002 example database contains the same code as the MS-Access 2003's. To find said database: http://support.microsoft.com/?scid=kb%3Ben-us%3B276376&x;=20&y;=10

    Bye !

  6. Henry Helgen says:

    The Northwind example for Access 2003 is missing an operand. These lines:
    If (result
    0) Then

    should actually be
    If (result <> 0) Then
    It was missing the not equal. It works great after that. Thanks.

  7. a.p.r.pillai says:

    The Code is corrected. Thanks for pointing out the Error.

  8. I really liked this post, this one is going straight into my stumble upon akun :)

  9. I want to thank the blogger very much not only for this post but also for his all previous efforts. I found thesimpleyoga.com to be greatly interesting. I will be coming back to thesimpleyoga.com for more information.

  10. Bookmarked your website. Thank you for sharing. Definitely worth the time away from my workload.

  11. I just wanted to comment your blog and say that I really enjoyed reading your blog post here. It was very informative and I also digg the way you write! Keep it up and I’ll be back to read more in the future…

Leave a Reply

You must be logged in to post a comment.