Hi all...
I'm trying to add a new record to a table that is not the record source for my main form. In fact, the Main form is displaying only the results of queries. In the past on other projects, I have been able to use the following method:
Dim db As Database
Dim rst1 As Recordset
Set db = CurrentDb
Set rst1 = db.OpenRecordset("tblwhatever")
rst1.AddNew
.....etc.
With this project, however, when I begin to key in the first line 'Dim db As Database', the word Database doesn't appear. My only options are:
DataAccessPage
DataAccessPages
DataTypeEnum
Date
DefaultWebOptions
...etc.
The first question is why don't I have the option to choose Database?
and
Secondly, is there some other way I might achieve adding a new record to my table?
Thanks in advance,
Chuck
I'm trying to add a new record to a table that is not the record source for my main form. In fact, the Main form is displaying only the results of queries. In the past on other projects, I have been able to use the following method:
Dim db As Database
Dim rst1 As Recordset
Set db = CurrentDb
Set rst1 = db.OpenRecordset("tblwhatever")
rst1.AddNew
.....etc.
With this project, however, when I begin to key in the first line 'Dim db As Database', the word Database doesn't appear. My only options are:
DataAccessPage
DataAccessPages
DataTypeEnum
Date
DefaultWebOptions
...etc.
The first question is why don't I have the option to choose Database?
and
Secondly, is there some other way I might achieve adding a new record to my table?
Thanks in advance,
Chuck