'I am putting my folder in sharing then try to use these from different pc but it shows
'file already in used PLEASE GIVE ME SOLUTION
Dim dblogin As New ADODB.Connection
Dim rclo As New ADODB.Recordset
Private Sub cmdok_Click()
dblogin.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\tmgmt.mdb;Persist Security Info=False"
rclo.Open "select uname,pas from p where pas='" & txtPassword.Text & "' and uname='" & txtusername.Text & "';", dblogin, adOpenDynamic, adLockBatchOptimistic
If (rclo.BOF = True And rclo.EOF = True) Then
MsgBox "incorrect Username or Password", vbExclamation, "Logon Message"
Else
'MsgBox "Login Successful", vbInformation, "Logon Message"
lbuser.Caption = txtusername.Text: lbpass.Caption = txtPassword.Text
Me.Hide
MDIForm1.Show
End If
rclo.Close
dblogin.Close
Set rclo = Nothing
Set dblogin = Nothing
End Sub