كلامة صحيح .... جرب الكود هذا الان .......................
Call GetWaiting("Please wait ... data is processing")
On Error Resume Next
Dim db As DAO.Database
Dim rstFrom As Recordset
Dim rstTo As Recordset
Set db = CurrentDb()
Dim RC, i, r, rr As Integer
Set rstTo = db.OpenRecordset(Me.Combo15, dbOpenDynaset)
Set rstFrom = db.OpenRecordset("tblTemp", dbOpenDynaset)
CurrentDb.Execute ("Delete * From Me.Combo15")
rstFrom.MoveFirst: rstFrom.MoveLast
RC = rstFrom.RecordCount
rstFrom.MoveFirst
For i = 1 To RC
rstTo.AddNew
For r = 0 To rstFrom.Fields.Count - 1
For rr = 0 To rstTo.Fields.Count - 1
If rstFrom.Fields(r).name = rstTo.Fields(rr).Properties("Caption") Or rstFrom.Fields(r).name = rstTo.Fields(rr).name Then
rstTo.Fields(rr) = rstFrom.Fields(r)
End If
Next rr
Next r
rstTo.Update
rstFrom.MoveNext
r = 0
rr = 0
Next i
DoCmd.Close acForm, "frmWaiting"
rstTo.Close
rstFrom.Close
Set rstTo = Nothing
Set rstFrom = Nothing
Set db = Nothing