Dennisk said:
Are you trying to develop a login system, if so then don't bother. Firstly Access comes with workgroup protection although it can be difficult to set up at first. Any user written password system can always be bypassed or broken into. The last db I looked at had a user developed login system and even though the bypass key had been disabled I was able to invoke the debugger and get into the login form that way.
Thank for your opinion.
But i am not worry my user will bypass the user checking, because my user just need a data system to help them to search the data, and give the different button to select different from to view the needed data.
And now i find out the error happened on the connection to CurrentProject.
------------------------------------------------------------------------
Public Function GetRS(ByVal strQuery As String) As ADODB.Recordset
Dim rs As New ADODB.Recordset
Dim conn As New ADODB.Recordset
'On Error GoTo GetRS_Error
Set conn = CurrentProject.Connection
rs.Open Trim$(strQuery), conn, adOpenKeyset, adLockOptimistic
Set GetRS = rs
End Function
-------------------------------------------------------------------------
The debugger show me that conn = <Object variable or with block variable not set.> & CurrentProject.Connection = Provider= Microsoft.Jet.OLEDB.4.0;UserID=Admin;Data...
what should i do to correct it?