PDA

Click to See Complete Forum and Search --> : Setting up a 'remote address'(?) for a database name.


Alison Verkroost
Mar 31st, 2000, 11:15 PM
I have wriitten a program which is stored in the same folder as the database which it is linked to. However, the address of this folder often changes. Can I set up a 'remote address'(?), to point visual basic to the right folder, without giving it the full address?

bambang6
Apr 2nd, 2000, 07:31 PM
It'll be helpfull if you use Showopen from commondialog
You can add commondialog to add component with Microsoft Commond dialog.

this is the example of using commondialog SHOWOPEN


Public Sub main11_Click(Index As Integer)
On Error GoTo nodatabase
CommonDialog1.CancelError = True
CommonDialog1.Filter = "*.mdb*"
CommonDialog1.ShowOpen

namafile = CommonDialog1.FileName

If Err = 0 Then
Label1.Caption = CommonDialog1.FileName
Else
MsgBox Err.Description
End If

nodatabase:
On Error GoTo 0
End Sub