If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do I add a filename to database using browse?
(WinXP Access2003)
I need a simple way to add a command button to a form that will open a browse window and, upon finding the desired file, put the path and filename into a field in my database. Any help in this area would be wonderful. Thanks. |
#2
|
|||
|
|||
How do I add a filename to database using browse?
Using the API is the most version resistant.
http://www.mvps.org/access/api/api0001.htm rlpmaverick wrote: (WinXP Access2003) I need a simple way to add a command button to a form that will open a browse window and, upon finding the desired file, put the path and filename into a field in my database. Any help in this area would be wonderful. Thanks. -- HTH - RuralGuy (RG for short) acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200703/1 |
#3
|
|||
|
|||
How do I add a filename to database using browse?
Add the following code to your Button.
Private Sub Command0_Click() Dim strFileName As String With Application.FileDialog(msoFileDialogFilePicker) .AllowMultiSelect = False .Show strFileName = .SelectedItems(1) End With Me.FilePathField.value = strFileName End Sub This code will require a reference to the Microsoft Office Object Library (in your case it would be Microsoft Office 11.0 Object Library) Hope this Helps Regards Anthony |
Thread Tools | |
Display Modes | |
|
|