انا اخدت كتاب من هذا المنتدى الجميل وانا عم اطبق اجالي مسج ايرور
هذا هو الكود:
Private Sub Command1_Click()
If Text1 = " " Then
MsgBox " äÇÓÝ, íÌÈ ÇÏÎÇá ÇÓã ãÓÊÎÏã ", vbCritical + vbMsgBoxRight, "ÎØÇ"
Text1.SetFocus
Exit Sub
End If
If Text2 = " " Then
MsgBox " ÇáÑÌÇÁ ÇÏÎÇá ßáãÉ ÇáãÑæÑ ", vbCritical + vbMsgBoxRight, " ÎØÇ "
Text2.SetFocus
Exit Sub
End If
If Text2.Text <> Text3.Text Then
MsgBox " äÇÓÝ,ßáãÉ ÇáãÑæÑ ÛíÑ ÕÍíÍÉ ", vbCritical + vbMsgBoxRight, " ÎØÇ "
Exit Sub
End If
SaveMsg = MsgBox("åá ÇäÊ ãÊÇßÏ ãä ÇäÔÇÁ ãÏíÑ ÇáäÙÇã¿", vbQuestion + vbMsgBoxRight + vbYesNo, " Êã ÍÝÙ ÇáÈíÇäÇÊ ")
If SaveMsg = vbYes Then
RS.AddNew
RS![userName] = Text1
RS![Password] = Text2
RS![GAdd] = True
RS![GEedit] = True
RS![GPrint] = True
RS![GCeateUser] = True
RS.Update
MsgBox " ÊãÊ ÚãáíÉ ÇáÍÝÙ ÈäÌÇÍ ", vbInformation + vbMsgBoxRight, " Êã ÇáÍÝÙ "
UserNames = Text1
UserPassword = Text2
Set RS = Nothing
Set DB = Nothing
MDIForm1.Show
Unload Me
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
PoolConnection
SQLs = "Select * From User"
If RS.State = adStateOpen Then RS.Close
RS.Open SQLs, DB, adOpenKeyset, adLockPessimistic
If Not RS.RecordCount = 0 Then
frmLogin.Show
Unload Me
End If
End Sub
الرسالة :
run-time error "-2147217900 (80040e14)': syntax error in FROM clause
شو الحل؟
