473,397 Members | 2,084 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,397 software developers and data experts.

Splitting database for fe/be rst.index error

82 64KB
having an error about recordset properties ... e.g.: RST.index --> OPERATION IS NOT SUPPORTED FOR THIS TYPE OF OBJECT

Expand|Select|Wrap|Line Numbers
  1. Set db = CurrentDb
  2. Set RST = db.OpenRecordset("tblEmployees", dbOpenDynaset)
  3.  
  4. RST.Index = "Primarykey"
  5. RST.Seek "=", Me.cboEmployee
  6.  
  7. If RST.strEmpName = Me.cboEmployee And RST.strEmpPassword = Me.txtPassword And RST.strAccess = "ADMIN" Then
  8.  
  9.     DoCmd.Close acForm, "frmLogon", acSaveNo
  10.     DoCmd.OpenForm "ARCHIVE MENU FORM"
  11.     Forms![ARCHIVE MENU FORM]![cmdAddUser].Enabled = True
  12. ElseIf RST.strEmpName = Me.cboEmployee And RST.strEmpPassword = Me.txtPassword And RST.strAccess = "USER" Then
  13.  
  14.     DoCmd.Close acForm, "frmLogon", acSaveNo
  15.     DoCmd.OpenForm "ARCHIVE MENU FORM"
  16.     Forms![ARCHIVE MENU FORM]![cmdAddUser].Enabled = False
  17. Else
  18.     MsgBox "Password Invalid.  Please Try Again", vbOKOnly, "Invalid Entry!"
  19.     Me.txtPassword.SetFocus
  20. End If
  21. RST.Close
Apr 8 '13 #1
10 1131
Seth Schrock
2,965 Expert 2GB
What did you Dim rst as? Do you have a line that is something like
Expand|Select|Wrap|Line Numbers
  1. Dim rst As DAO.Recordset
Apr 8 '13 #2
deanvilar
82 64KB
no i don't, I just set RST as openrecordset ...
Apr 8 '13 #3
deanvilar
82 64KB
@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
Apr 8 '13 #4
Seth Schrock
2,965 Expert 2GB
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.
Expand|Select|Wrap|Line Numbers
  1. Dim db As DAO.Database
  2. Dim RST As DAO.Recordset
This could solve the problem, but I'm not sure. What version of Access are you using?
Apr 8 '13 #5
Seth Schrock
2,965 Expert 2GB
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)
Apr 8 '13 #6
deanvilar
82 64KB
yes you are right I don't have Option Explicit, am using access 2003 sir...
Apr 8 '13 #7
deanvilar
82 64KB
ok let me read about this .. and try whatever i can find, thank you so much .. i really appreciate it
Apr 8 '13 #8
deanvilar
82 64KB
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?
Apr 8 '13 #9
Seth Schrock
2,965 Expert 2GB
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.
Apr 8 '13 #10
deanvilar
82 64KB
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 =(
Apr 8 '13 #11

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

Similar topics

2
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...
1
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...
0
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...
0
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...
6
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...
6
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...
3
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...
1
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...
2
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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...
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...

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.