Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System.NullReferenceException

Status
Not open for further replies.

proteome

Technical User
May 14, 2003
115
US
I continue to get the above mentioned error even though the file is located where it is supposed to be. My code is listed below.

Dim ws As DAO.Workspace
Dim db As DAO.Database

Try
db = ws.OpenDatabase("C:\LogIn_Samples.mdb")
Catch f As NullReferenceException
Throw New NullReferenceException("The database could not be found!!", f)
End Try

Does anyone have any suggestions. Please forgive me if this has already been answered but the search dialog is down at the moment

Thanks
 
Could you please explain a bit further by what you mean

"DAO.Workspace has no reference
 
In other words, create a new Workspace using the "new" keyword. You've reserved memory for a Workspace, but haven't actually populated it with one.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top