473,666 Members | 2,571 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

runtime error 3001

1 New Member
Need a little help please! I am getting runtime error 3001 at oRS.filter = ("RM TYP = '" & cell.Text & "'")

Private Sub CommandButton5_ Click()
Application.Scr eenUpdating = False
Application.Cal culation = xlCalculationMa nual

Dim oRS As New ADODB.Recordset
Dim oCN As New ADODB.Connectio n

With oCN
.Provider = "Microsoft.jet. oledb.4.0"
.CursorLocation = adUseClient
.Open "C:\HC_MDB\HC_D B_ACC.mdb"

End With

With oRS
.LockType = adLockOptimisti c
.CursorType = adOpenDynamic
.ActiveConnecti on = oCN
.Open "Select * from INFO"

Set wsHC = ThisWorkbook.Wo rksheets("RS")
MsgBox wsHC.Range("E14 ", wsHC.Range("E" & wsHC.Rows.Count ).End(xlUp)).Ad dress
For Each cell In wsHC.Range("E14 ", wsHC.Range("E" & wsHC.Rows.Count ).End(xlUp)).Ce lls
If cell.Text <> "" Then

oRS.Filter = ("RM TYP = '" & cell.Text & "'")

If oRS.RecordCount <> 0 Then
cell.Offset(0, 2).Value = oRS.Fields("STR UCT HT").Value
cell.Offset(0, 3).Value = oRS.Fields("CEI LING HT").Value

End If

oRS.Filter = adFilterNone
End If
Next cell
End With

Application.Cal culation = xlCalculationAu tomatic
Application.Cal culate
Application.Scr eenUpdating = True
End Sub

Database: "C:\HC_MDB\HC_D B_ACC.mdb" Table = "info"
RM TYP DESCRIPTION STRUCT HT CEILING HT
E1 INSTRUCTIONAL 14 10
E2 SCIENCE / LAB 14 10
E3 OFFICE 14 9
E4 RECEPTION / WAITING 14 9
E5 STAFF 14 9
E6 CONFERENCE 14 9
E7 FOOD SERVICE 14 9
E8 UTILITY - SHOPS 14 9
E9 SERVICE - STORAGE 14 10
E10 "RESTROOMS ""General"" " 14 9
E11 "RESTROOMS ""Private"" " 14 8
E12 "COMMONS ""Single Entry""" 14 10
E13 "COMMONS ""Double Entry""" 14 11
E14 "COMMONS ""Zone Division""" 14 10
E15 SHAFT / PLENUM 14 14
E16 STAIR / ELV 14 14
E17 GYM
E18 ATHLETIC ROOMS
E19 ATHLETIC STORAGE
E20 LOCKER ROOMS



Thanks in advance
Aug 1 '06 #1
1 9395

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

Similar topics

5
17867
by: Philippa | last post by:
I'm trying to access data in vba using the openrecordset command. The data in on a SQL Server 2000 database, and I have linked tables to that data. the Table I'm trying to access is one of these linked tables, and my codes is as follows: Set vRS = CurrentDb.OpenRecordset(tbl_DataCommentLog) when this line is executed I get the error: "Run-time error '3622':
8
3367
by: Owen Jenkins | last post by:
Hello. For years I've been using the DBEngine.CompactDatabase code to make backups of backend databases. But now I've struck a baffling problem where I get an Invalid Argument error. This happens on an XPHome machine with both A97 and A2000 installed. I simplified the code and the error still occurs. In the following new test database containing only this procedure, dbSource refers to a brand new database with no objects which is...
0
755
by: Kirk | last post by:
I'm trying to use a Web Service to be a Remoting client of an existing ..NET 2.0 server. But I get the following error when I try to use System.Runtime.Remoting.Channels.Http in my WebService. The same code works fine in a standalone app. I have inspected System.Runtime.Remoting.dll with ildasm, and I can see the ....Channels.Http namespace there. I verified that the virtual directory is configured to use v2.0.50727 (the error message...
6
8703
by: ET | last post by:
Hi, I need help with run time errors. The application is running on Access 2002. It is recordset, loops the records from query, one by one row, in ADO it gives error 80040e21, invalid argument, -2147217887, the same code but adjusted for DAO gives the following error: run time error '3001', invalid argument. Here is the code for DAO:
3
1776
by: nkechifesie | last post by:
I have written this code to search my Database before adding a record but at the point (RsVehType.Find StrSql), it gives an error Run-Time error '3001' Arguements are of the wrong type, are out of acceptable range, or in conflict with one another What is wrong please. I have written the code below Private Sub Form_Load() Me.Height = 3210 Me.Width = 7710
2
3153
by: amindi | last post by:
Hi, In my VB program ,the run time error '3001' occurs when I try to execute the openRecordset statement. Set rsCustomers = db.OpenRecordset("Customers") Here, "db" is the connection. "Customers" is the table name. "rsCustomers" is the recordset. The error message is like this, "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another".
4
7813
by: wishwish20 | last post by:
I am having a problem with my Database. I am having an issue with being able to update a set of records. What I need is a way to uncheck a checkbox in the underlying table in this query. The # of checkboxes to be unchecked will be different for each customer, so I've been told an SQL query won't work. When I run the following code I get "error 3027 Cannot update. Database or object is read only" It stops at rs.edit testString = "SELECT...
0
1549
by: Imran | last post by:
JOB ID: BE 3001 Please refer to the Job ID in all your communication both in subject line of your email and in the body text. Hi Friends, Good Morning ,...Hope you doing good! Our client needs a PeopleSoft Performance Tester LOC: MN Duration: Long term
4
8275
by: kwokv616 | last post by:
I have written the following code: Sub UpdateIL4010DB() Dim rst As DAO.Recordset Dim tbl As DAO.TableDef Dim db As DAO.Database Dim fld As DAO.Field Dim indx As DAO.Index Set db = CurrentDb
0
8454
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
8363
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8883
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
8561
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
8645
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7389
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...
0
5672
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
4200
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...
1
2776
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 we have to send another system

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.