N
nxqviet
Hi all,
I have a series of check boxes on a form and a button. When this botton
is clicked, a series of Append queries will be ran depending on the
value of the check boxes.
For example, if check box 1 is checked, Append query 1 will run
if check box 2 is checked, Append query 2 will run
if check box 3 is checked, Append query 3 will run
But if check box 1 AND 2 and 3 were checked, all 3 Append Queries
should run.
Or when only 2 were check, 2 respective queires should run.
This is very simple, but I have about 10 check boxes.
So I have this code:
If checkbox1.value = true Then
docmd......to run append query1
Else
If checkbox2.value = true Then
docmd......to run append query2
Else
If checkbox3.value = true Then
docmd......to run append query3
Else
If checkbox4.value = true Then
docmd......to run append query4
.....
End If
End If
End If
End If
.....
With this code, If the first check box (checkbox1) is False, would the
code continue on checking the second and third and so on? And If that
first box is True in stead, would it still continue on checking the
second and third ... ?
How should I write a code to accomplish this task?
Please help and Thank you for your time,
V_
I have a series of check boxes on a form and a button. When this botton
is clicked, a series of Append queries will be ran depending on the
value of the check boxes.
For example, if check box 1 is checked, Append query 1 will run
if check box 2 is checked, Append query 2 will run
if check box 3 is checked, Append query 3 will run
But if check box 1 AND 2 and 3 were checked, all 3 Append Queries
should run.
Or when only 2 were check, 2 respective queires should run.
This is very simple, but I have about 10 check boxes.
So I have this code:
If checkbox1.value = true Then
docmd......to run append query1
Else
If checkbox2.value = true Then
docmd......to run append query2
Else
If checkbox3.value = true Then
docmd......to run append query3
Else
If checkbox4.value = true Then
docmd......to run append query4
.....
End If
End If
End If
End If
.....
With this code, If the first check box (checkbox1) is False, would the
code continue on checking the second and third and so on? And If that
first box is True in stead, would it still continue on checking the
second and third ... ?
How should I write a code to accomplish this task?
Please help and Thank you for your time,
V_