اتفضلى ما تريدين
2 combobox.rar
Private Sub account_AfterUpdate()
Dim strSQL As String
Select Case Me.account.Value
Case "فردي"
' contract.RowSource = ""
contract.RowSourceType = "قائمة القيم"
contract.RowSource = "بدون تعاقد;بدون تعاقد"
contract.Value = "بدون تعاقد"
discount.Value = "0"
discount.Enabled = True
Case "تعاقد"
strSQL = "SELECT contract_price_tbl.code, contract_price_tbl.contract, contract_price_tbl.discount FROM contract_price_tbl;"
contract.RowSourceType = "Table/Query"
contract.RowSource = strSQL
discount = contract.Column(2)
discount.Enabled = False
Case "مجاني"
' contract.RowSource = ""
contract.RowSourceType = "قائمة القيم"
contract.RowSource = "بدون تعاقد;بدون تعاقد"
contract.Value = "بدون تعاقد"
discount.Value = "100"
discount.Enabled = True
Case "مختبر خارجى"
strSQL = "SELECT out_tbl.code, out_tbl.out FROM out_tbl;"
contract.RowSourceType = "Table/Query"
contract.RowSource = strSQL
End Select
contract.Requery
End Sub