having an error about recordset properties ... e.g.: RST.index --> OPERATION IS NOT SUPPORTED FOR THIS TYPE OF OBJECT - Set db = CurrentDb
-
Set RST = db.OpenRecordset("tblEmployees", dbOpenDynaset)
-
-
RST.Index = "Primarykey"
-
RST.Seek "=", Me.cboEmployee
-
-
If RST.strEmpName = Me.cboEmployee And RST.strEmpPassword = Me.txtPassword And RST.strAccess = "ADMIN" Then
-
-
DoCmd.Close acForm, "frmLogon", acSaveNo
-
DoCmd.OpenForm "ARCHIVE MENU FORM"
-
Forms![ARCHIVE MENU FORM]![cmdAddUser].Enabled = True
-
ElseIf RST.strEmpName = Me.cboEmployee And RST.strEmpPassword = Me.txtPassword And RST.strAccess = "USER" Then
-
-
DoCmd.Close acForm, "frmLogon", acSaveNo
-
DoCmd.OpenForm "ARCHIVE MENU FORM"
-
Forms![ARCHIVE MENU FORM]![cmdAddUser].Enabled = False
-
Else
-
MsgBox "Password Invalid. Please Try Again", vbOKOnly, "Invalid Entry!"
-
Me.txtPassword.SetFocus
-
End If
-
RST.Close
10 1131
What did you Dim rst as? Do you have a line that is something like
no i don't, I just set RST as openrecordset ...
@Seth Schrock
I placed it .. also dim db as DAO.database, but it gives me an error for rst.index --> OPERATION IS NOT SUPPORTED FOR THIS TYPE OF OBJECT
Then you must not have Option Explicit set. Please read Require Variable Declaration. Then at the top of your code page you should see Option Compare Database. Right below that add Option Explicit. This will require you to declare all your variables. This will make it much easier to troubleshoot your code.
You will need to add the following code above the code that you showed us. - Dim db As DAO.Database
-
Dim RST As DAO.Recordset
This could solve the problem, but I'm not sure. What version of Access are you using?
Oops. Cross posted with you. What version of Access are you running? Here is the link to the MSDN website that tells how to use the Recordset.Index command. It is for Access 2010, but up at the top is a drop down for other versions that you can choose from to get the syntax for your version (which is probably the same, but best to make sure): Recordset.Index Property (DAO)
yes you are right I don't have Option Explicit, am using access 2003 sir...
ok let me read about this .. and try whatever i can find, thank you so much .. i really appreciate it
as I read... I have same use of rst.index ... but still it gives me an error OPERATION IS NOT SUPPORTED FOR THIS TYPE OF OBJECT ... is splitting the table can be a factor of this error?
Well, I'm not familiar with the Index property itself, but I have used other recordset properties before and all of my databases have split backends, so I would be surprised if that was the case. However, you could try it on the backend database and see if it works. Otherwise, I'm out of guesses as all I have to go on is the MSDN website right now.
many thanks for your support ... I wanted to changed my codes from rst.index and rst.seek .. to other types like rst.findfirst..etc .. but sadly I need to restructure all of my codes =(
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Alex Vidal |
last post by:
Hi, I have windows 2000 server with IIS and I program ASP.
I use the string: "Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=basedatos.mdb;" to data base Access and it always works ok.
But I...
|
by: Jaunty Edward |
last post by:
Hi,
I have heared about the database index, I know its something that
makes the index of some of the fields and can result in a very fast
search for a large DB.
I wanted to know if we have...
|
by: Tonny |
last post by:
HI,
I am trying to view data from an MS access Database on a server from
my workstation, on an NT network.
I installed this machine recently.
I am trying to view the data from the browser...
|
by: Ash |
last post by:
Hi All,
I get the following error on a application which was running well for 4 years.
The error happens few times a day.
-----------------------------------------------
Microsoft JET Database...
|
by: Jurgen Haan |
last post by:
Hi hi, I'm trying to perform a redirected restore, but I get a nice
error returned. Does anyone have an idea of what the -5130 errorcode means?
db2inst@ELMO:~> db2 restore db efproddb into...
|
by: jsgoodrich |
last post by:
I am looking for some help if anyone can lend a hand.
I have a simple php website that displays a table from my mysql
database.
To prep for my MCSE I moved my home server to Windows 2003...
|
by: JJM0926 |
last post by:
I've got a contact form with a submit button where users have to enter
their support information. Some fields are required some are not.
When I test out the form if I leave everything blank I get...
|
by: jason1987 |
last post by:
I keep getting the undefined index error on the bottom two rows of my code simparent and equtype - the other two work fine yet there is no difference in my code. equtypeid is even from the same table...
|
by: phuc2583 |
last post by:
I have a problem with an application I developed with code charge. Whenever I
try to access a table in a database I get the following error:
Microsoft JET Database Engine error '80040e09'
Cannot...
|
by: dragrid |
last post by:
when I run program below I am getting an index error on line 18
chk2 = .......
indexerror : list index out of range
Any help appreciated
Thx
import os
import string
import sys
import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
| |