Tick box when query value is not null

clare_voiant

Board Regular
Joined
Mar 20, 2002
Messages
76
Hello again,

I have a query that checks postcodes against a list of 29000 postcodes. The query runs (via a macro on_exit) when the postcode is typed into the data entry form and opens on the screen in all its its glory to display the answer.....
But (and there's always a but!!!)

I dont want the query to be visible, I have a yes/no tickbox that i want ticking if the value of the query is not null.

any ideas?

your help, as always, is very much appreciated.

Clare
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi Clare
You can determine whether or not the query has records or not (the null condition) but building a 2nd query based on the 1st query. The 2nd query is a count of the records returned in the first query except it returns a nil value instead of null. You can then test for the =0 or <>0 condition with your check box.
HTH, Andrew. :)
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top