473,414 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Compiler not recognizing DAO object

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
Aug 27 '07 #1
6 2789
missinglinq
3,532 Expert 2GB
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)>
Aug 27 '07 #2
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 advance
Aug 27 '07 #3
Actually I am doing something like that

Dim rst as DAO.recordset

set rst = currentdb.openrecordset("SELECT Atty_TK,Client,Matter,Description 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("Description")
end if
Aug 27 '07 #4
missinglinq
3,532 Expert 2GB
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)>
Aug 27 '07 #5
Ahhh.. ok.....Very very thanks.... Sorry about my English..
Aug 27 '07 #6
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. Thanx
Aug 27 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mike B | last post by:
In the GNU g++ compiler, I can't get it to recognize the following as a compiler error: typedef bool integerSizeCheck ; Shouldn't the compiler not allow me to do this? Is there some option I...
2
by: Dale Anderson | last post by:
I have a schema that I'm trying to read. The schema has an element named 'GrantApplication' and one with a namespace prefix named 'SF424:GrantApplication'. When I try to read this schema in, I...
20
by: News | last post by:
I'm new to c and gcc. I was wondering if anyone can point me to a web page or book that has a list of the warning messages and their meanings. Are the warnings the same no matter what compiler...
102
by: Skybuck Flying | last post by:
Sometime ago on the comp.lang.c, I saw a teacher's post asking why C compilers produce so many error messages as soon as a closing bracket is missing. The response was simply because the compiler...
1
by: Tom Brent | last post by:
I have had this problem before. VS2003 code all of a sudden will stop compiling my changes to the code. Its happened on several different projects. DRiving me nuts. I reloaded entire VS once still...
244
by: Ajinkya | last post by:
Can anyone suggest me a good compiler for(c/cpp) for windows? I tried dev cpp but its debugging facility is very poor.
1
by: thulaseeram | last post by:
hi, i am using the following code for uploading <div id="iframe" name="iframe" style="width:850px; height:120px;"> <iframe name="attach_frame" id="attach_frame"...
1
by: JSeemann | last post by:
Hi there, I have an issue with serializing C# objects to XML using a generic type using System.Xml.Serialization. Say I have classes defined as below: public class ParentClass { private...
1
by: Big Daddy | last post by:
I have an interface called PeriodicJob. In a DLL, I declare the interface and then create a class that implements the interface. In a different executable, I also declare the interface. I then...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.