I want to use a database field as a condition in an IF statement.
This has obvious maintenance benefits to the program as I can add conditions and msgbox strings to the recordset without having to update the program.
For Example;-
rs_Conditions contains the following records
- Database Field Condition MsgboxString
- Record1 "txtOrder = 10" "Value Too High"
- Record2 "txtOrder = 4 "Value Too Low"
Can anyone tell me what the syntax is for the IF statement as I keep getting Type Mismatch errors.
Example;-
If rs_Conditions!Condition Then msgbox rs_Conditions!MsgboxString
This would really help me a lot.
King Regards
MattN
This has obvious maintenance benefits to the program as I can add conditions and msgbox strings to the recordset without having to update the program.
For Example;-
rs_Conditions contains the following records
- Database Field Condition MsgboxString
- Record1 "txtOrder = 10" "Value Too High"
- Record2 "txtOrder = 4 "Value Too Low"
Can anyone tell me what the syntax is for the IF statement as I keep getting Type Mismatch errors.
Example;-
If rs_Conditions!Condition Then msgbox rs_Conditions!MsgboxString
This would really help me a lot.
King Regards
MattN