Hi
I have some forms in access which I am trying add code rather than using the wizards. (if there is a simpler way, please let me know) My experience with vba is limited.
I am using the following code behind a command button to add a record to a table...
Set cndb = New ADODB.Connection
cndb.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=CATABASE.MDB "
Set rsLogin = New ADODB.Recordset
rsLogin.Open "SELECT * FROM tbl_customer;", cndb, adOpenKeyset, adLockOptimistic
rsLogin.AddNew
rsLogin!vic_caseno = CaseNo
rsLogin.Update
rsLogin.Close
My Question: Is there a keyword for the current database or some way to grab a handle to the current database without specifying the path and filename??
Any help or assistance would be appreciated,
Thanks
Kelly![]()
![]()




ATABASE.MDB "
Reply With Quote