|
'Text3, Text 4 and Data1 all have Visible
'property's set to False Private Sub Command1_Click() SearchStr$ = Text1.Text 'Search the database For the information Data1.Recordset.Index = "User" 'This is my index Property Data1.Recordset.Seek "=", SearchStr$ If Data1.Recordset.NoMatch = False And Text3.Text = _ Text2.Text Then ' If the text in Text1 = a record and the relation ' password text = correctly then... ' This sequence here is like a access detection.. ' If the User only had access to this form and not that then ' you would add another invisible Text box and ' and grant access or restricted access to the form.. If Text4.Text = 0 Then MsgBox "User Logged On to Unrestricted program" ElseIf Text4.Text = 1 Then MsgBox "User Logged On to Restricted program" Else MsgBox "User Logged On to Default program" End If Else MsgBox "No access you piece of $#%^!" End If End Sub |