I've been encountering a sudden program crash when my MS Access database is not found. Can someone help me with my connectionstring.
here's the code :
DoEvents
Set con = New ADODB.Connection
With con
.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};Dbq=mydatabase.mdb;DefaultDir=C:\Projects\Database\;Uid=;Pwd="
.CursorLocation = adUseClient
.Open
End With
I want to put code something like this...
if connection = successful then
continue to table query...
else
show message box
endif