Querying Hyperlinks

guamlet

Board Regular
Joined
Dec 29, 2002
Messages
145
I'm writing a query that's being run from a form. In the form, i have a check box. If the check box is checked, i would like to display any of the values that are not blank. If the check box is empty, i would like to display all values, blank and non-blank. The issue I think i'm having may be centered around the fact that the field in quesiton within the query contains hyperlinks. I have only been able to populate the query by using the name of the field [RNALoc] as either the true or false criteria for the iif statement i'm writing. Below is the IIF statement that i'm envisioning)

IIF([Forms]![Query Form]![chkItem]=-1, Is not null, All values)

So if I write the statement as

IIF([Forms]![Query Form]![chkItem]=-1,[RNALoc],[RNALoc])

I can get it to show everything that is not a null value

If I change the null values to 0, which then has the hyperlink address "http://0", then I can see everything with [RNALoc]. However, if I write

IIF([Forms]![Query Form]![chkItem]=-1, <>"http://0", [RNALoc])

or if i write

IIF([Forms]![Query Form]![chkItem]=-1 <>0, [RNALoc])

I retuen no values when the check box is checked. and I can still return all values when the check box is unchecked.

Any suggestions?
 
Sweet! I had originally only put in Len(Nz([Field]))...not the =0 part to my expression...It's all making sense now! Thanks a million!
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,215,957
Messages
6,127,936
Members
449,411
Latest member
AppellatePerson

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