> I ain't no VB guy, as evidenced by this OT post. But I want to create
> a module that proppts the user for a file and performs a
> dataconversion process. I am using Access, but can't remember
> (don't think I ever knew) how to open a file browse dialog so the
> user can select the appropriate file.
I do this in VBA:
Dim dbsCRPR As Database
Dim VntDatabaseFile As Variant
Const glrcFilter As String = "Access Database,*.mdb;" & _
"*.mda,All files,*.*"
Const glrcTitle As String = "Select Peer Review Database"
'Display a dialog box
OpenDBDialog:
VntDatabaseFile = Application.GetOpenFilename( _
FileFilter:=glrcFilter, _
FilterIndex:=0, _
Title:=glrcTitle, _
MultiSelect:=False)
'Make sure the user chose a database
If VarType(VntDatabaseFile) <> vbString Then GoTo OpenDBDialog
'Open the database
Set dbsCRPR = _
DBEngine.Workspaces(0).OpenDatabase(VntDatabaseFile, True, False)
-David
________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk! For your FREE software, visit:
http://dl.www.juno.com/get/tagj.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.