وعيلكم السلام
يمكنك ذلك من حدث Not In List ONالخاص بمربع التحرير
ضع الكود االتالي وجرب النتيجة ...
Private Sub customerName_NotInList(NewData As String, Response As Integer)
Dim dbsOrders As DAO.Database
Dim rstCustomer As DAO.Recordset
Dim intAnswer As Integer
On Error GoTo ErrorHandler
intAnswer = MsgBox("اضافة " & NewData & "الى قائمة الزبائن?", _
vbQuestion + vbYesNo)
If intAnswer = vbYes Then
Set dbsOrders = CurrentDb
Set rstCustomer = dbsOrders.OpenRecordset("tblCustomer")
rstCustomer.AddNew
rstCustomer!customerName = NewData
rstCustomer.Update
Response = acDataErrAdded ' Requery the combo box list.
Else
Response = acDataErrDisplay ' Require the user to select
' an existing Customer.
End If
rstCustomer.Close
dbsOrders.Close
Set rstCustomer = Nothing
Set dbsOrders = Nothing
Exit Sub
ErrorHandler:
MsgBox "Error #: " & Err.Number & vbCrLf & vbCrLf & Err.Description
End Sub