مرفق مثال للتعديل علية
عند البحث عن موظف باستخدام رقم الموظف 1 أو 2 أو 3
لاتوجد اى مشاكل ولكن عند التعديل على بيانات الموظف رقم 1 يتم التعديل رقم 1 ولا توجد مشاكل
وعند التعديل على رقم 2 او 3 او اى رقم لايتم التعديل على نفس الرقم بل يتم التعديل على الموظف رقم 1
ارجو تصحيح الكود
على ان يتم التعديل على نفس رقم الموظف المستعلم عنة
Set q = CurrentDb.OpenRecordset("SELECT * FROM employee;")
If IsNull(txtno) Then
Beep
txtname.SetFocus
Exit Sub
End If
q.edit
'q!no_employee = txtno
q!name_employee = txtname
q!national_id = txtnid
q!gender = compogender
q!date_of_birth = txtdatebirth
q!contry = txtcantry
q!city = textcity
q!address = txtaddress
q!date_start = txtstartdate
q!qualificaion = txtqolficaiton
q.Update
'txtno = Null
txtname = Null
txtnid = Null
compogender = Null
txtdatebirth = Null
txtcantry = Null
textcity = Null
txtaddress = Null
txtstartdate = Null
txtqolficaiton = Null
MsgBox "تمت عملية التعديل على البيانات بنجاح", vbCritical, "برمجة السيد الجوهرى"
End Sub
