Visual Basic / Access Xp help
-
Hi there. I'm very new at VB programing, but got a good background in Access. I have been trying to link pictures to a access database without actually embedding them, and have succeeded! But now I'm battling to find code or control dialog to search for files (like a browser) to specify a file path. I have tried MS common dialog control, but it gives me an error to register and license the package, no matter what I try. (I did buy the original Office XP Pro X| ) Can anyone please help or any suggestions?
-
Hi there. I'm very new at VB programing, but got a good background in Access. I have been trying to link pictures to a access database without actually embedding them, and have succeeded! But now I'm battling to find code or control dialog to search for files (like a browser) to specify a file path. I have tried MS common dialog control, but it gives me an error to register and license the package, no matter what I try. (I did buy the original Office XP Pro X| ) Can anyone please help or any suggestions?
**Option Explicit
Declare Function** GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
Declare Function GetSaveFileName Lib "comdlg32.dll" Alias "GetSaveFileNameA" (pOpenfilename As OPENFILENAME) **As LongType** MSA_OPENFILENAME
' Filter string used for the File Open dialog filters.
' Use MSA_CreateFilterString() to create this.
' Default = All Files, *.* strFilter As String' Initial Filter to display. ' Default = 1. lngFilterIndex **As Long** ' Initial directory for the dialog to open in. ' Default = Current working directory. strInitialDir **As String** ' Initial file name to populate the dialog with. ' Default = ". strInitialFile **As String** strDialogTitle **As String** ' Default extension to append to file if user didn't specify one. ' Default = System Values (Open File, Save File). strDefaultExtension **As String** ' Flags (see constant list) to be used. ' Default = no flags. lngFlags **As Long** ' Full path of file picked. On OpenFile, if the user picks a ' nonexistent file, only the text in the 'File Name' box is returned. strFullPathReturned **As String** ' File name of file picked. strFileNameReturned<