AccessChap
Registered User.
- Local time
- Today, 00:07
- Joined
- Apr 14, 2009
- Messages
- 32
Hi guys and gals,
Got a weird problem so really hoping someone has seen this before and can lend a hand
I have recently split a database into a front end and a back end for multi-user reasons. In the front end the database contains all the code of the back end but none of the data. Instead there are linked tables pointing to the back end database's tables to keep the front end to a sensible size. Since making this change I now get the above runtime error on this piece of code:
Function Validate_User_Exist()
' Open database tables to be updated (Build recordsets)
Set db = CurrentDb()
Set rstUser = db.OpenRecordset("tbl_User", dbOpenSnapshot)
Validate_User_Exist = False
' Errors on the line below
rstUser.Index = "PrimaryKey"
Do While Not rstUser.EOF
rstUser.Seek "=", Form_User_Create.Textbox_UserID
If rstUser.NoMatch = False Then
msg = MsgBox("User already created", vbOKOnly + vbInformation,
"Autoline Security Database")
Validate_User_Exist = True
Exit Function
End If
rstUser.MoveNext
Loop
End Function
Prior to splitting out the database this code worked with no issues. Anyone have any idea what is going on please? I'm stuck on this
TIA
Andy
Got a weird problem so really hoping someone has seen this before and can lend a hand

I have recently split a database into a front end and a back end for multi-user reasons. In the front end the database contains all the code of the back end but none of the data. Instead there are linked tables pointing to the back end database's tables to keep the front end to a sensible size. Since making this change I now get the above runtime error on this piece of code:
Function Validate_User_Exist()
' Open database tables to be updated (Build recordsets)
Set db = CurrentDb()
Set rstUser = db.OpenRecordset("tbl_User", dbOpenSnapshot)
Validate_User_Exist = False
' Errors on the line below
rstUser.Index = "PrimaryKey"
Do While Not rstUser.EOF
rstUser.Seek "=", Form_User_Create.Textbox_UserID
If rstUser.NoMatch = False Then
msg = MsgBox("User already created", vbOKOnly + vbInformation,
"Autoline Security Database")
Validate_User_Exist = True
Exit Function
End If
rstUser.MoveNext
Loop
End Function
Prior to splitting out the database this code worked with no issues. Anyone have any idea what is going on please? I'm stuck on this

TIA
Andy