D
Downie
Login Code to Open BRANCHES FORM
Private Sub Command4_Click()
Dim SQLString As String
Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rst As New ADODB.Recordset
DoCmd.SetWarnings False
Set cnn = CurrentProject.Connection
Set cmd.ActiveConnection = cnn
SQLString = "SELECT * "
SQLString = SQLString & "FROM estimates "
cmd.CommandText = SQLString
rst.CursorLocation = adUseClient
rst.Open cmd, , adOpenKeyset, adLockOptimistic
If (rst!Login) = TB_Login And (rst!Password) = TB_Password
Then
**** Me.OpenArgsformBRANCHES
End If
DoCmd.SetWarnings True
End Sub
Private Sub Command4_Click()
Dim SQLString As String
Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rst As New ADODB.Recordset
DoCmd.SetWarnings False
Set cnn = CurrentProject.Connection
Set cmd.ActiveConnection = cnn
SQLString = "SELECT * "
SQLString = SQLString & "FROM estimates "
cmd.CommandText = SQLString
rst.CursorLocation = adUseClient
rst.Open cmd, , adOpenKeyset, adLockOptimistic
If (rst!Login) = TB_Login And (rst!Password) = TB_Password
Then
**** Me.OpenArgsformBRANCHES
End If
DoCmd.SetWarnings True
End Sub