السلام عليكم ورحمة الله وبركاته
عندي مربعات نص عند الفتح يضهر لي اول سجل بالجدول ما اريده هو تحديد كل مربع نص ماذا يفتح من سجل
هذا الكود المحطوط
Dim dbvact As Database
Dim tbvtac As Recordset
Set dbvact = CurrentDb()
Set tbvtac = dbvact.OpenRecordset("tblRom", dbOpenDynaset)
هذا هو الكود الذي يضهر السجل التلقائي tbvtac.MoveFirst
[txt1] = " " & " " & " " & " " & " " & " " & " " & " " & tbvtac!noRom & " " & _
" " & " " & " " & " " & tbvtac!namcost & " " & " " & " " & tbvtac!tel & _
" " & " " & " " & tbvtac!detaMO
If tbvtac!halat = 0 Then
[txt1].BackColor = RGB(0, 255, 0)
[asd].BackColor = RGB(0, 255, 0)
ElseIf tbvtac!halat = 3 Then
[txt1].BackColor = 15395328
[asd].BackColor = 15395328
ElseIf tbvtac!halat = 1 And tbvtac!tyejar >= 1 Then
[txt1].BackColor = RGB(255, 0, 0)
[asd].BackColor = RGB(255, 0, 0)
If tbvtac!detaMO = Date And tbvtac!amoResp < tbvtac!presDay * tbvtac!totodays Then
[txt1].ForeColor = 16777215 'áæä ÇáÎØ ÃÈíÖ
[asd].BackColor = 0
ElseIf tbvtac!amoResp >= tbvtac!presDay * tbvtac!totodays And tbvtac!detaMO = Date Then
[asd].BackColor = RGB(255, 0, 0)
[txt1].ForeColor = 16777215
ElseIf tbvtac!detaMO > Date And tbvtac!amoResp < tbvtac!presDay * tbvtac!totodays Then
[asd].BackColor = 0
Else
End If
ElseIf tbvtac!halat = 1 And tbvtac!tyejar = 2 Then
[txt1].BackColor = 206
[asd].BackColor = 206
If tbvtac!detaMO = Date And tbvtac!amoResp < tbvtac!presDay * tbvtac!totodays Then
[txt1].ForeColor = 16777215 'áæä ÇáÎØ ÃÈíÖ
[asd].BackColor = 0
ElseIf tbvtac!amoResp >= tbvtac!presDay * tbvtac!totodays And tbvtac!detaMO = Date Then
[asd].BackColor = 206
[txt1].ForeColor = 16777215
ElseIf tbvtac!detaMO > Date And tbvtac!amoResp < tbvtac!presDay * tbvtac!totodays Then
[asd].BackColor = 0
Else
End If
ElseIf tbvtac!halat = 2 Then
[txt1].BackColor = RGB(255, 255, 0)
[asd].BackColor = RGB(255, 255, 0)
End If
ارجو الافاده
واشكر الموقع الجميل هذا