Conv Access 97->2000-Gets a method or data member not found error

For the following code which compiles and runs 
successfully in MS Access 97, when converting to MS Access 
2000 the following compile error occurs "Method or data 
member not found." for the line below.

tempID = rs.[UserID]

UserID is a field in the tblSecurity table. It seems that 
the tblSecurity table is not opening in MS Access 2000 
since this error will occur using any field, not just 
UserID. This error does not occur in MS Access 97.

PLEASE HELP. The routine is displayed below.

Sincerely thanks,
Phil


------------------
CODE - Shown Below
------------------


Private Sub cmdOK_Click()
Dim dbCurrent As Database, dbSecurity As Database, rs As 
Recordset
Dim l_times As Integer
Dim TempPw As String, tempID As String
Dim DocName As String
Dim LinkCriteria As String

DoCmd.Hourglass True

Set dbCurrent = CurrentDb
Set dbSecurity = DBEngine.Workspaces(0).OpenDatabase
("C:\clintril\clinappl.mdb", False, False, ";pwd=xxxx")
Set dbSecurity = DBEngine.Workspaces(0).OpenDatabase
("C:\clintril\clindata.mdb", False, False, ";pwd=xxxx")

Set rs = dbSecurity.OpenRecordset("tblSecurity", 
DB_OPEN_DYNASET)

Do Until rs.EOF Or rs.NoMatch
   tempID = rs.[UserID]

---------------------
"Error on above line"
---------------------

    If rs.[UserID] = [SignOnName] Then
        If rs.[UserPassword] = [SignOnPw] Then
            Forms![Sign on dialog].Visible = yes
                        
            Me![User Group] = rs.[UserGroup]
            Me![AccessPayments] = rs.[AccessPayments]
            Me![AssignStudyCode] = rs.[AssignStudyCode]
            
            DocName = "Main Menu"
            DoCmd.Hourglass False
            DoCmd.OpenForm DocName, , , LinkCriteria
            DoCmd.Maximize
            Exit Sub

        Else
            If IsEmpty(rs.[UserPassword]) Or IsNull(rs.
[UserPassword]) Then
              If Len([SignOnPw]) > 8 Then
                Exit Do
              Else
                rs.Edit
                rs![UserPassword] = [SignOnPw]
                rs.Update
                Forms![Sign on dialog].Visible = yes
         
                DocName = "Main Menu"
                DoCmd.Hourglass False

                DoCmd.OpenForm DocName, , , LinkCriteria
                DoCmd.Maximize
              
                Exit Sub

            End If
            Else
                TempPw = rs.[UserPassword]
                Exit Do
            End If
        End If
    End If
    rs.MoveNext
Loop
0
Phil
3/3/2004 10:14:57 PM
access.conversion 3038 articles. 0 followers. Follow

1 Replies
736 Views

Similar Articles

[PageSpeed] 27

Try changing it to:
  tempID = rs![UserID]

Hedi
>-----Original Message-----
>For the following code which compiles and runs 
>successfully in MS Access 97, when converting to MS 
Access 
>2000 the following compile error occurs "Method or data 
>member not found." for the line below.
>
>tempID = rs.[UserID]
>
>UserID is a field in the tblSecurity table. It seems that 
>the tblSecurity table is not opening in MS Access 2000 
>since this error will occur using any field, not just 
>UserID. This error does not occur in MS Access 97.
>
>PLEASE HELP. The routine is displayed below.
>
>Sincerely thanks,
>Phil
>
>
>------------------
>CODE - Shown Below
>------------------
>
>
>Private Sub cmdOK_Click()
>Dim dbCurrent As Database, dbSecurity As Database, rs As 
>Recordset
>Dim l_times As Integer
>Dim TempPw As String, tempID As String
>Dim DocName As String
>Dim LinkCriteria As String
>
>DoCmd.Hourglass True
>
>Set dbCurrent = CurrentDb
>Set dbSecurity = DBEngine.Workspaces(0).OpenDatabase
>("C:\clintril\clinappl.mdb", False, False, ";pwd=xxxx")
>Set dbSecurity = DBEngine.Workspaces(0).OpenDatabase
>("C:\clintril\clindata.mdb", False, False, ";pwd=xxxx")
>
>Set rs = dbSecurity.OpenRecordset("tblSecurity", 
>DB_OPEN_DYNASET)
>
>Do Until rs.EOF Or rs.NoMatch
>   tempID = rs.[UserID]
>
>---------------------
>"Error on above line"
>---------------------
>
>    If rs.[UserID] = [SignOnName] Then
>        If rs.[UserPassword] = [SignOnPw] Then
>            Forms![Sign on dialog].Visible = yes
>                        
>            Me![User Group] = rs.[UserGroup]
>            Me![AccessPayments] = rs.[AccessPayments]
>            Me![AssignStudyCode] = rs.[AssignStudyCode]
>            
>            DocName = "Main Menu"
>            DoCmd.Hourglass False
>            DoCmd.OpenForm DocName, , , LinkCriteria
>            DoCmd.Maximize
>            Exit Sub
>
>        Else
>            If IsEmpty(rs.[UserPassword]) Or IsNull(rs.
>[UserPassword]) Then
>              If Len([SignOnPw]) > 8 Then
>                Exit Do
>              Else
>                rs.Edit
>                rs![UserPassword] = [SignOnPw]
>                rs.Update
>                Forms![Sign on dialog].Visible = yes
>         
>                DocName = "Main Menu"
>                DoCmd.Hourglass False
>
>                DoCmd.OpenForm DocName, , , LinkCriteria
>                DoCmd.Maximize
>              
>                Exit Sub
>
>            End If
>            Else
>                TempPw = rs.[UserPassword]
>                Exit Do
>            End If
>        End If
>    End If
>    rs.MoveNext
>Loop
>.
>
0
Hedi
3/3/2004 11:39:28 PM
Reply:

Similar Artilces:

GETPIVOTDATA under Excel 2000
Can anyone give me advice on the differences between how th �GETPIVOTDATA� command works differently in EXCEL 2002 vs. Excel 2000 I created a file in Excel 2002, but I must install it on a compute using Excel 2000, and the Excel 2002 GETPIVOTDATA syntax does not wor under Excel 2000. Thanks -- Message posted from http://www.ExcelForum.com There's information in the following MSKB article: HOW TO: Use the GetPivotData Worksheet Function in Excel 2000 http://support.microsoft.com/default.aspx?id=211949 and there are examples in Excel's Help files. steveski < wrote: > Can a...

Open external files from access
Hello averyone, I'm developing an apllication with access 2003 in WXP professional, and I'm storing documents in a folder... so they can be opened within access, I actually store the complete path of the files in each record.. so I can call the file from it's path and filename using the following code: Application.FollowHyperlink Me.Path In my PC that runs quite well!!!, it opens each .doc, or .pdf file. BUT in some clients (with access 2003 and WXP pro.) when I open a .pdf file, the file opens and inmediatelly closes. This doesn't happen with .doc files. They remain ope...

Outlook Error #20
Have Outlook 97 and cannot open up. I get the following error "Outlook has caused an error in <unknown>. If you continue to experience problems, try restarting your computer. Restarted a number of times and does not solve the problem. Anyone have any advice? ...

Windows update error message (with a question and a fix)
I have a client which is having a problem running Windows Update on a Windows SBS 2003 everytime I click on Windows Update after 10secs it comes back with a message "Internet Explorer cannot display the webpage" tried google to find a fix but everything I've tried does not seem to work. So today I decided to ghost the sever drive on to a old 80GB to have a backup just incase something happens it took 30mins to ghost then I tried booting from the new drive to see if it would boot and was all good. The funny thing is that when it booted I tried Windows Update and it w...

How do I fix OBDC syntax error when exporting from Outlook to Exc.
I have been trying to export an Outlook Contacts file to Excel file but keep getting error message: "OBDC ERROR HAS OCCURRED IN...EXCEL TRANSLATOR [MICROSOFT] [OBDC EXCEL DRIVER] SYNTAX ERROR IN FIELD DEFINITION." How can I fix? Bob ...

Duplicate data
I have a file that contains duplicate supplier records and I want to be able to identify where a supplier number is duplicated and then delete all but 1 of the duplicate records. I was given a COUNTIF formula but it is not working. I was told to add 2 columns and in the first blank column type =Row() in the cell. In the second blank column type =IF(COUNTIF(A$1:$A1,A1)>1,0,1) My supplier numbers start in Column A Row 2. How can I get this to work? -- Thank you, Jodi I would... - Sort on supplier number - in the first available column (in row 2), put the formula....

Error msg "error accessing file" /Access 2000 / Windows Xp home edition
Hello, I have a field called Job_date, on the detail part of a "Master & detail" form, which has been fine. I have it set to show "to-days date" when double clicked .. i.e. an event procedure runs. All of a sudden I am getting the msg "Error access file. Network connection may have been lost" when I double click the field. I am not on a network, have a network card connected to my internet cable modem. I also got the msg when I tried to add a new field to the form in the Master area, also when I go in to try and change to event procedure code. Have...

Accessing Windows Live emails via Outlook
I've just upgraded from Vista to Windows 7, at the same time I am trying to use Outlook for my emails (instead of Windows Live). When I try to set up a new account, I enter my email address and password then select Next, Outlook cannot find the server. Any suggestions as to what I'm doing wrong would be appreciated. If you really mean "Outlook" you are in the wrong newsgroup. The newsgroup to which you posted is for the Windows Live Mail program. You are more likely to find Outlook experts in the Outlook newsgroup: microsoft.public.outlook.general (via NNTP), o...

including dblink in a query to retrieve data
I connect to a table using a db link i want to execute an spl query and populate results in to a pivo table. My MS Query does not allow me to use a dblink and connect to th table. Please help -- Message posted from http://www.ExcelForum.com ...

Unable to Open Outlook 2000
All of a sudden, I can't open Outlook 2000. I've been using it for a couple of years. It locked up on Monday so I ended task. Now it won't open from my desktop. I tried to do a repair using the Office Professional 2000 CD that came with my computer. I am in a job search and need access to my contacts, calendar, important saved emails, etc. Can anyone help? Regards, John You may have a corrupted outcmd.dat file. This is the file that stores your toolbar customizations, and when it becomes corrupted, Outlook can't use it at startup to build your toolbars, thus cau...

SQL 2005 report error with dates.
Hi All, My client and server have UK regional settings. I have a report that has a datetime parameter, the report is using english(UK) settings, When I run the report and select a datetime of 25/2/2007 (from the calendar selection) I get the error "The value provided for the report parameter 'startdate' is not valid for its type' Any suggestions on how to resolve this? Thanks Mike OK, after much hair pulling heres the quick and dirty fix for all non -us locales 1. Change the language of the report to english (UK), In Layout view, report parameters, select l...

How to write to the registry in Vista from Access
Hi... This is my first post and I want to know if there is somewhere a code to write to the registry. I have one from someone in the past but I try to use it on Windows Vista and instead of putting the key in the local machine/software it is adding to some virtual folder. Does anyone knows why??? Thanks... This is not really an Access question, but a Vista one. My best guess though is that you need administrative privileges to write to the registry, and Vista by default does not let anyway have those privileges without specifically logging in that way. -- Arvin Meyer, MCP, MVP ht...

Access Denied in CRM for Outlook
A user can access CRM via the Web client, and has previously accessed CRM via the CRM for Outlook client. Yesterday, due to a misperception that we had run out of licenses, I took away the user's license, but subsequently put it back. Now the user can't access CRM for Outlook. The error message is just Access Denied. He tried shutting down and rebooting - same result. Should I delete the user and re-create? Other users can still access CRM for Outlook client. Any thoughts on this one? Thanks, Ian Actually, I think the problem happened last Thursday afternoon, when I ...

Access 97 and Access 2003
I have software's that absolutely have to use Access 97 structured data in order to work, however I now need to install Office 2003. Can both versions of Access be installed and run on the same computer? This is a XP computer with plenty of horsepower. Any help would be appreciated before I attempt this. Thanks Multiple versions of Access can and will run on a single machine. I currently have Access 97 and Access XP all installed on this machine and both versions behave nicely. However, with that said, I think you need to know that once you open a database with a specific vers...

Label name and Import Data to Outlook
I use Excel to import/export contacts data. When I do one from scratch, and go to import, I get an error about no label??? I then go back into excel, open the file, and click on Insert/Name ... and get kind of lost after that .... can anybody lend a clue as to the right way to do this? Thanks in advance, --Jim ...

error message cood1197
hi peeps, os xp sp2 my wp11 will not play shop bought or any copied cd's and i get cood 1197 error message. any help would be appreciated with thanks On Wed, 19 May 2010 13:35:01 -0700, uncledoo <uncledoo@discussions.microsoft.com> wrote: > >hi peeps, os xp sp2 my wp11 will not play shop bought or any copied cd's >and i get cood 1197 error message. any help would be appreciated with thanks Hi - the error code actually is C00D1197 (it has zeros not the letter 'o') so google searches turn up the solution pretty quickly after realising th...

Access pivot chart totals
Hello When I view a query in pivot table view, I can see sub totals and grand totals. Is there any way to plot this data on the graph when I view the same query in pivot chart view? In practice, I have a list of types of defect and thier percentage but I would like to see the total percentage on the graph too. I can do this easily in excel but I'm setting up these queries in access for others to use. Thanks Seb ...

Outlook 2000 How to auto forward if Contact is in my address book
I am using RIM Blackberry and do not want to receive the 30 or so SPAM emails a day that my desktop receives. I thought I could set up a filter to forward emails to the Blackberry if the address is in my address book. Is there a way to entering this filter? Paul Not in Outlook 2000. That's a feature of later versions. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Paul S" <ps@noreply.hotmail.com> wrote in message news:c5f8qc$smi...

Access shared file in OWA
Hi, I run SBS 2008. I enabled file access in Exchange 2007. I have two questions. 1. Is it possible to enable folder download? My user has to download the files individully. 2. Can user upload files? I submited this question in Exchange newsgroup for two days and no one answers. So I look for help here. Thanks in advacne! Lisa Hello Lisa, Thanks for your posting here. Before we go further, I would like to confirm with you that what "shared file in OWA" you are referring to? And how do you "share" the "files"? Do you mean Exchange server...

Access 1.x
Trying to retrieve data from Access 1.x with Access 2000. Any hope ? > Trying to retrieve data from Access 1.x with Data? Yes. Link to the tables. (david) "Jim H" <cbsg@verizon.net> wrote in message news:8d7501c432ba$bebcda10$a301280a@phx.gbl... > Trying to retrieve data from Access 1.x with > Access 2000. Any hope ? ...

Expected end sub error , only on one copy of identical code
Hello I am currently working on a MS Access 2000 database. I have a form and its associated VB6 code. When i add a new control to the form (button, label etc) the VB6 code presents the compile error: "Expected End Sub". I cannot see why this is doing this. The new control is merely placed on the form, nothing changed and no interference with current controls. The code is identical before, and after the error producing change. I have also checked the area of code around the error and there are no strange entries disguised as white space. And i have also ensured that the End Su...

ERROR ASP 0115
Dear, I am Using Exchange 5.5 SP4 , When I open owa and login, it display below message error 'ASP 0115' Unexpected error /exchange/USA/inbox/messages.asp A trappable error occurred in an external object. The script cannot continue running. Is anyone know how to fix Regards. Sean Starting here http://support.microsoft.com/default.aspx/kb/320514 would be a good plan. Go through the issues and resolutions, then come back with any more focussed questions you might have. "SEAN" <laiwai_man@hotmail.com> wrote in message news:eyfM3AdvFHA.3472@TK2MSFTNGP10.phx.gbl...

update data
How does one go about getting current data from Access to Excel without all the "want to replace this file" and other pop ups that Access ask along the way. I jsut want a use to push a button and Poof! out spits a updated Access report into Excel. Please help! Hi TKM, Is the report always from the same source? If so, try right clicking on the data and select "refresh data" HTH Simon TKM wrote: >How does one go about getting current data from Access to Excel without all >the "want to replace this file" and other pop ups that Access ask along the &g...

Import / Export Problem with Access 2000
When I import outlook emails from Outlook the From: (address) field is not imported but the date received is there. When I export from Outlook to Access the From: (address) field is there but the date is there. I need to import / export the From: (address) and the date received fields for my database. Windows 98se (All updates applied) Office 2000 IE 6 Thank you, Lisa eagle1@eaglette.com ...

How to get a warning message when less than 16 words are filled in
I am looking for a way in Excel 2000 to have a warning message when someone fills in less than 16 words in a cell. Is this possible? Earlier I received the following advice: Use this formula in Data > Validation > Settings > Custom > Formulas: IF(LEN(A1)-LEN(SUBSTITUTE(A1," ",""))+1<15,"Minimum of 15 words","") In which A1 is the cell that should contain more than 15 words. However, this does not seem to work. No matter what number of words are filled in in cell A1, there always is an error message. Does anyone know of a way to do this...