S
Sham_on_air
hi
i've made a database for temporary id cards,
to add photos i've made a command button - when i click on this button i
want it to take me to a specific folder where i store my photos!! please
help...
below given is the coding which i use for this button's on enter event..
Private Sub AddPicture_Enter()
getFileName
End Sub
Sub getFileName()
Dim fileName As String
Dim result As Integer
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Select Employee Picture"
.Filters.Add "All Files", "*.*"
.Filters.Add "Bitmaps", "*.bmp"
.Filters.Add "JPEGs", "*.jpg"
.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
End If
End With
End Sub
i've made a database for temporary id cards,
to add photos i've made a command button - when i click on this button i
want it to take me to a specific folder where i store my photos!! please
help...
below given is the coding which i use for this button's on enter event..
Private Sub AddPicture_Enter()
getFileName
End Sub
Sub getFileName()
Dim fileName As String
Dim result As Integer
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Select Employee Picture"
.Filters.Add "All Files", "*.*"
.Filters.Add "Bitmaps", "*.bmp"
.Filters.Add "JPEGs", "*.jpg"
.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
End If
End With
End Sub