اريد ان اختصر هذا الكود فى سطر او سطرين او كما يتراء لخبراء المنتدى
If Me.commanfaz = "منفذ1" Then
Me.txt1.Visible = True
Me.txtm1.Visible = True
Me.txtID.Enabled = False
Me.txtitems.Enabled = False
Me.txtmag.Enabled = False
Else
Me.txt1.Visible = False
Me.txtm1.Visible = False
Me.txt2.Visible = False
Me.txtm2.Visible = False
Me.txt3.Visible = False
Me.txtm3.Visible = False
Me.txt4.Visible = False
Me.txtm4.Visible = False
Me.txt5.Visible = False
Me.txtm5.Visible = False
Me.txt6.Visible = False
Me.txtm6.Visible = False
Me.txt7.Visible = False
Me.txtm7.Visible = False
Me.txt8.Visible = False
Me.txtm8.Visible = False
Me.txtmst.Visible = False
Me.txtstrorag.Visible = False
If Me.commanfaz = "منفذ2" Then
Me.txt2.Visible = True
Me.txtm2.Visible = True
Me.txtID.Enabled = False
Me.txtitems.Enabled = False
Me.txtmag.Enabled = False
Else
Me.txt1.Visible = False
Me.txtm1.Visible = False
Me.txt2.Visible = False
Me.txtm2.Visible = False
Me.txt3.Visible = False
Me.txtm3.Visible = False
Me.txt4.Visible = False
Me.txtm4.Visible = False
Me.txt5.Visible = False
Me.txtm5.Visible = False
Me.txt6.Visible = False
Me.txtm6.Visible = False
Me.txt7.Visible = False
Me.txtm7.Visible = False
Me.txt8.Visible = False
Me.txtm8.Visible = False
Me.txtmst.Visible = False
Me.txtstrorag.Visible = False
If Me.commanfaz = "منفذ3" Then
Me.txt3.Visible = True
Me.txtm3.Visible = True
Me.txtID.Enabled = False
Me.txtitems.Enabled = False
Me.txtmag.Enabled = False
Else
Me.txt1.Visible = False
Me.txtm1.Visible = False
Me.txt2.Visible = False
Me.txtm2.Visible = False
Me.txt3.Visible = False
Me.txtm3.Visible = False
Me.txt4.Visible = False
Me.txtm4.Visible = False
Me.txt5.Visible = False
Me.txtm5.Visible = False
Me.txt6.Visible = False
Me.txtm6.Visible = False
Me.txt7.Visible = False
Me.txtm7.Visible = False
Me.txt8.Visible = False
Me.txtm8.Visible = False
Me.txtmst.Visible = False
Me.txtstrorag.Visible = False
end if
end if
end if