P
Phil
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
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