do you want to open your .mdb file in Microsoft Access when you click on a button in your vb6 program?
if yes, then you can try this code :-
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
ShellExecute Me.hwnd, "Open", [B]"c:\mydatabase.mdb"[/B], vbnullstring, vbnullstring, vbMaximizedFocus
your right but my mbd file is password protect and application ask for password when i clikc vb button is thier any parameter i can pass with open command so i can run application without password screen
you have to provide the password manually for your database if you use shellexecute to open the file from your application.
but if you wish to open the database (more techinal term is --> "Connecting to Database") which is password protected then you can do this from your application. the password can be given in to the connectionstring to access the database without making your system to prompt for the password.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...