Accessing recordsets with VBA...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I am trying to add a record based on the NotInList event of a combobox and
am getting shut down way too early. I am hoping someone can shed a little
light as to my problem. I found a good code example at www.mvps.org but
right from the getgo I have a problem with the code.
In the declarations:
Private Sub cbxAEName_NotInList(NewData As String, Response As Integer)
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strMsg As String

DAO.Database does not show up in the popup list and I get an error when
trying to make it work. I am running OfficeXP and I believe my database
version is 2000 (due to default settings that I didn't initially know about
when i created my database) So, is there a new format to access a database
and recordset or what? Please help me get back on the right path. :)
Thanks,
Dana Simmelink
 
Access 2000 (and 2002, for that matter) doesn't have a reference set to DAO
by default. With any code module open, select Tools | References from the
menu bar, scroll through the list of available references until you find
Microsoft DAO 3.6 Object Library then check it. Fortunately, this oversight
was corrected in Access 2003.
 
Doug (and others),
I would just like to say thank you to you and all other MVPs (and non-MVPs)
that take the time to answer questions from others that need your valuable
assistance. It is sites like these and people like you that keep me going
through my 'tough' times!
Thanks again!
Dana
 
Back
Top