Hi All
I have a slight problem with some code I'm working with. I want to go to a specific File path on my system if a field is Null. If the field is not null, then I want to goto the file path specified in the text field.
The Code so Far:
Dim strTemp As String 'For returning if user cancels
Dim strNewPath 'The new path the user selects
Dim strCaption As String ' What we want the box to say
If Not IsNull(Me.imgpath) Then
strTemp = Me.imgpath
Else
strTemp = "C:\"
End If
'strCaption = Me.lblPath1.Caption
strNewPath = BrowseForFile(strTemp, strCaption)
'playsound (strNewPath)
If IsNull(strNewPath) Or strNewPath = "" Or strNewPath = "\" Then
Me!imgpath = strTemp
Else
Me!imgpath = strNewPath
End If
Theoretically, a browse windo should appear at the "C:\" but it doesn't, It goes to the desktop. I've tried nuemerous file paths but everytime it goes to the desktop. Any Suggestions?
Thanks
Jedel
I have a slight problem with some code I'm working with. I want to go to a specific File path on my system if a field is Null. If the field is not null, then I want to goto the file path specified in the text field.
The Code so Far:
Dim strTemp As String 'For returning if user cancels
Dim strNewPath 'The new path the user selects
Dim strCaption As String ' What we want the box to say
If Not IsNull(Me.imgpath) Then
strTemp = Me.imgpath
Else
strTemp = "C:\"
End If
'strCaption = Me.lblPath1.Caption
strNewPath = BrowseForFile(strTemp, strCaption)
'playsound (strNewPath)
If IsNull(strNewPath) Or strNewPath = "" Or strNewPath = "\" Then
Me!imgpath = strTemp
Else
Me!imgpath = strNewPath
End If
Theoretically, a browse windo should appear at the "C:\" but it doesn't, It goes to the desktop. I've tried nuemerous file paths but everytime it goes to the desktop. Any Suggestions?
Thanks
Jedel