473,698 Members | 2,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compiler not recognizing DAO object

15 New Member
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 2798
missinglinq
3,532 Recognized Expert Specialist
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
ahmadbaseet
15 New Member
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
ahmadbaseet
15 New Member
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 if
Aug 27 '07 #4
missinglinq
3,532 Recognized Expert Specialist
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
ahmadbaseet
15 New Member
Ahhh.. ok.....Very very thanks.... Sorry about my English..
Aug 27 '07 #6
ahmadbaseet
15 New Member
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
1212
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 can turn on to allow me to use this style of "compile-time assert"?
2
2010
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 get an exception saying 'A datatable named 'GrantApplication' alread belongs to this dataset'. Why is dotnet not recognizing the namespace prefix and treating these like two separate elements? Thanks for your help.
20
2712
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 you use, or are they different for each compiler? I have looked all over the gcc web site, but I can't find anything that explains what the warnings are. If someone could take the time to help me out and direct me to some info about this, I'd...
102
5674
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 can't tell where a bracket is missing.... a few weeks have past, I requested a feature for the delphi ide/editor "automatic identation of code in begin/end statements etc" and today when I woke up I suddenly released a very simple solution for this...
1
1136
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 no fix. I am getting compile errors as its not recognizing a public var as boolean at the beginning of the form load. But program runs. Any suggestions? Is there a way to flush something? Thanks :(
244
9519
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
1472
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" src="http://100.100.100.233/storyclix/upload.php" style="width:850px; height:120px;" frameborder="0"></iframe> </div> <div class="form-item" name="_Confirm_buttons" id="_Confirm_buttons"> <input type="button" value="Add media" class="form-submit"...
1
1532
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 object _arguments; public object Arguments { get { return _arguments; } set { _arguments = vale; }
1
1617
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 load the assembly with late binding and create an instance of the class with reflection. I try to cast the object to the class type of the interfact, but I get an invalid cast exception. It says that the object I am creating isn't a PeriodicJob. ...
0
8674
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9157
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7721
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4366
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4615
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
1999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.