Allora io ho provato a fare così:
- lasciare le due textbox senza alcun nome,
- aggiungere due label "Digita nome Utente" e "Digita password",
- eliminare la seconda Image,
- e modificare il codice così:
--------------------
Option Explicit
Private Sub Image1_Click()
If Text1.Text = "user" And Text2.Text = "ciaociao" Then
Me.Visible = False
Form2.Show
GoTo 1
End If
If Text1.Text = "amministratore" And Text2.Text = "ciao" Then
Me.Visible = False
Form3.Show
GoTo 1
End If
MsgBox "Username e Password non riconosciuti", vbCritical, "Errore"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
1:
End Sub
--------------
Saluti
|