Dear all,
When does Clicking on a check box, option button, toggle button or selecting an item in the combobox,
I see no calculation of the price will appear in the text box "Te Betalen"
What wrong in the code? Are there the scopes in de variables and constants?
Can somebody help me what I do wrong in the code.
I send the attachment as project "Jeugdbeweging"
Kind regards
Stephane
Stephane,
Your problem is in this bit of code.
bln_te_betalen = Not(chk_zee_2_dag Or _
chk_zee_1_week Or _
chk_ard_1_dag Or _
chk_ard_2_dag Or _
chk_ard_1_week)Or _
cbo_groep
You are using the logical Or correctly inside the parentheses, but the last logical Or is attempting to logically evaluate a value that can range from -1 (nothing selected) to 3 (the last selection). Logical Or can only be used with boolean values (1 or 0) True or False.
OK, technically, the zero is a logical False, but the -1,1,2,3 are are all logically True. To demonstrate this point, compile the original code again, run the program and change the combo box to the first item ("Speelcluppers", CurSel = 0). That is the only change to your controls that you can make that wont hide the text box.
That is not the only logic problem in that block. I can't really tell you more about it as I can't tell what you are trying to do with your logic in this code. I would have more of a chance if the variables were in English.
To demonstrate that the problem is in that code I showed above, change the code to this:
bln_te_betalen = %False 'Not(chk_zee_2_dag Or _
' chk_zee_1_week Or _
' chk_ard_1_dag Or _
' chk_ard_2_dag Or _
' chk_ard_1_week)Or _
' cbo_groep
David