Hey,
could someone correct my mistake in this code?
Description
- Form ekran_uzytkownika uses table which contains columns : pesel (as double) and haslo (as string)
- when I use only " "[pesel]=" & login " it works well but when I add any other condition I get error 13
- condition " "[haslo]=" & haslo " doesn't really work, it prompts me to type it twice as it couldn't recognize [haslo] column.
PeacePrivate Sub loguj_Click()
Dim login As Double
Dim haslo As String
Me.te_PESEL.SetFocus
login = Val(Me.te_PESEL.Text)
Me.te_haslo.SetFocus
haslo = Me.te_haslo.Text
DoCmd.OpenForm "ekran_uzytkownika", , , ("[pesel]=" & login) And ("[haslo]=" & haslo) ' error 13 '
End Sub
Solution
DoCmd.OpenForm "ekran_uzytkownika", , , "[pesel]=" & login & " And [haslo]='" & haslo & "'"when I use only " "[pesel]=" & login " it works well but when I add any other condition I get error 13
Added hidden field with password on ekran_uzytkownika form. (Not safe but it doesn't have to be in this casecondition " "[haslo]=" & haslo " doesn't really work, it prompts me to type it twice as it couldn't recognize [haslo] column.)