473,473 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CurrentDb work in MDB but ADP

2 New Member
Hi,

A sample code as below:
Private Sub codetesting()
Dim rs As DAO.Database

Set rs = CurrentDb

MsgBox (rs.Name)
End Sub

Why this code works in a MDB file but error in a ADP file with error code "Object variable or With block variable not set (Error 91)"?

Below the References library were selected both in MDB and ADP file

Visual Basic for Applications
Microsoft Access 9.0 Object library
OLE automation
Microsoft ActiveX Data Objects 2.8 Library
Microsoft DAO 3.6 object library


Jacky
Jun 23 '07 #1
2 1969
missinglinq
3,532 Recognized Expert Specialist
That would be because an ADP file is not a database! A database holds data, while an ADP file simply holds the front end structures!
Jun 23 '07 #2
jkych
2 New Member
That would be because an ADP file is not a database! A database holds data, while an ADP file simply holds the front end structures!
So, how do i open a recordset in ADP file? use ADO?
Jun 26 '07 #3

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

Similar topics

4
by: Matt Parkins | last post by:
I think I may have lost the plot. Just a few years ago I'm sure I wrote something similar to the following code: dim rst as recordset set rst = currentdb.openrecordset("mytable") ' blah blah...
8
by: frank | last post by:
Below is some code for doing and insert into one of my tables. The inserts do not work because a duplicate key exists, which I want to happen. The problem is, I cannot get access to return an error...
5
by: Vladislav Moltchanov | last post by:
I am making data entry tool in Acc2K for several data collecting centres. It is convenient to have several files (mde file, .mdb with tables only etc) located in the same directory. To make...
4
by: polux | last post by:
Hi everyone, i'm getting lost here... used to work with Access97 now Access2002 I'm having trouble finding currentdb Following references are checked: vb for applications
1
by: jnikle | last post by:
I have a parameter query named "qry_employee_info_reports" that I need to run in the OnOpen event of a form. I'm after its total number of records. The query's got several joins in it, and one of...
7
by: Tony M. | last post by:
I'm trying to execute an append query. I have a case that works, and one that returns an object not set error. THIS WORKS: Private Sub cmdArchiveRecs_Click() BeginTrans CurrentDb.Execute...
3
by: Richard Hollenbeck | last post by:
In DAO, is there any difference between "set db = CurrentDb()" with parentheses and "set db = CurrentDb" without parentheses? I'm just looking for data from a single field in a table inside the...
4
by: ray | last post by:
I am creating a new module in an existing ADP (new ground for me, have only ever used mdb's before). The module is a copy of some Albert Kallal code posted a while ago, which searches modules. ...
1
by: sphinney | last post by:
As my Access form opens, I want it to find the names of the tables in the current Access database and populate a combobox with the table (recordset) names. Problem is, the CurrentDb.Recordsets...
1
MitchR
by: MitchR | last post by:
Hello Folks; I have run myself into a hole I cannot get of and need some assistance. I have a Form "Frm_ATandT_Activation_Center" that has a sub form "Frm_ATandT_Activation"....
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.