Hi,
I have the following code in vb:
If dropdownlist = 16 Then
Me.RecordSource = "SELECT * FROM checkbox WHERE checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 772 AND checkbox_status_rs IS Null OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 772 AND checkbox_status_rs = 0 OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 773 AND checkbox_status_rs IS Null OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 773 AND checkbox_status_rs = 0 OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 774 AND checkbox_status_rs IS Null OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 774 AND checkbox_status_rs = 0 OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 775 AND checkbox_status_rs IS Null OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 775 AND checkbox_status_rs = 0 OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 776 AND checkbox_status_rs IS Null OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 776 AND checkbox_status_rs = 0 OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 777 AND checkbox_status_rs IS Null OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 777 AND checkbox_status_rs = 0 ORDER BY checkbox_omschr_rs"
Else
This doesn't work because the line starting with Me.recordsource is too long. But I really do need all these criteria so I see no way to make this any shorter.
Does anybody have any ideas?
Thanks in advance
Florens
I have the following code in vb:
If dropdownlist = 16 Then
Me.RecordSource = "SELECT * FROM checkbox WHERE checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 772 AND checkbox_status_rs IS Null OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 772 AND checkbox_status_rs = 0 OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 773 AND checkbox_status_rs IS Null OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 773 AND checkbox_status_rs = 0 OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 774 AND checkbox_status_rs IS Null OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 774 AND checkbox_status_rs = 0 OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 775 AND checkbox_status_rs IS Null OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 775 AND checkbox_status_rs = 0 OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 776 AND checkbox_status_rs IS Null OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 776 AND checkbox_status_rs = 0 OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 777 AND checkbox_status_rs IS Null OR checkbox_resgrp_rs = 10 AND checkbox_parent_rt = 777 AND checkbox_status_rs = 0 ORDER BY checkbox_omschr_rs"
Else
This doesn't work because the line starting with Me.recordsource is too long. But I really do need all these criteria so I see no way to make this any shorter.
Does anybody have any ideas?
Thanks in advance
Florens