منظور دوستمون صفحه لاگین با دیتابیس هست فکر کنم .
بیا اینک کدش فیلد هاشو خودت عوض کن
این قسمت برای نمایش تعداد یوزر های موجود در داخل کومبو باکس شما هست :
If Adodc1.Recordset.RecordCount > 0 Then
For o = 1 To Adodc1.Recordset.RecordCount
Datacombo1.AddItem Adodc1.Recordset.Fields("User")
Adodc1.Recordset.MoveNext
Next
End If
این هم کد اصلیت :
If Datacombo1.Text = "" Then
MsgBox " áØÝÇ äÇã ˜ÇÑÈÑí ÑÇ ÇäÊÎÇÈ äãÇÆíÏ ", vbExclamation, ""
Datacombo1.SetFocus
Exit Sub
End If
If Trim(Text1.Text) = "" Then
MsgBox " áØÝÇ ˜áãå ÚÈæÑ ÑÇ æÇÑÏ äãÇÆíÏ ", vbExclamation, ""
Text1.SetFocus
Exit Sub
End If
Adodc2.RecordSource = "SELECT * FROM Login WHERE User='" & Datacombo1.Text & "'"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
If UCase(Adodc2.Recordset.Fields("password")) = UCase(Text1) Then
Admin = Adodc2.Recordset.Fields("admin")
Main_frm.Show
Main_frm.txtFileName.Text = App.Path + "\Dbase.mdb"
Unload Me
Else
MsgBox " ˜áãå ÚÈæÑ ÔãÇ ÇÔÊÈÇå ÇÓÊ ", vbCritical, ""
L4.Caption = L4.Caption + 1
If L4.Caption = 3 Then
End
End If
Text1.SelStart = 0
Text1.SelLength = Len(Text1)
Text1.SetFocus
End If
End If