Hello every one. I am new to MS Access. I am using data SQL command SELECT to fetch some data from Access tables. I want to use DAO.Recordset object to get the data, but somehow my compiler is not recognizing the DAO object. I am using Access 2003. Can somebody help me. I cannot declare Dim rs As DAO. Thanks in advance
Compiler not recognizing DAO object
Collapse
X
-
Tags: None
-
Is the Microsoft DAO 3.6 Object Library set in references?
(Tools - References)
Then
Dim db As DAO.Database
Dim rs As DAO.Recordset
Linq ;0)> -
Hello, Can u please tell me how to set it?.Actually Whan I write Dim rs As, and then press space, the list comes in which all the classes are their, for example, String etc. But DAO is not their. I saw on my friends computer. it was their in Access 2003. As said I am new to Access. Thanks. Plz explain it if u can.. Very thanks in advanceComment
-
Actually I am doing something like that
Dim rst as DAO.recordset
set rst = currentdb.openr ecordset("SELEC T Atty_TK,Client, Matter,Descript ion FROM qry_LastJob")
if not rst.bof and not rst.eof then
Me.cmbo_atty = rst("Atty_TK")
Me.cmbo_Client = rst("Client")
Me.cmbo_matter = rst("Matter")
Me.Description = rst("Descriptio n")
end ifComment
-
To set the reference go into the VBA code editor from Design View for any form, then goto Tools - References and scroll wayyyyyyyyyy down until you get to Microsoft DAO 3.6 Object Library. Check it and click on OK and you should be set!
Linq ;0)>Comment
-
-
One more problem, I have two table which are connected thru one to many relationship. I am entering data in the main table with sql command. But getting Error Kay voilation error. I set one field as a primary key. Why am I getting KEY VOILATION error. ThanxComment
Comment