Hi,I am setting the recordsource of my report through visual basic and rendering a report. I have a sql query built and my labels and text fields on my report all set up. If certain fields are blank, I don;t want to print the labels that go with them.My query is something like this:
select firstName & ' ' & lastName AS patientName, address1, address2, physFirstName & ' ' & physLastName AS physName FROM patTable
Then I have labels on my report where the text is set to something like this:
iif(address1="","","Address #1")iif(patientName="","","Patient Name")
All fields that are NOT concatenated fields work fine. If the value is empty, the label is blank, if it has a value, the label shows as expected. For all fields where the "AS" is used, the labels do not work properly.
Any thoughts would be appreciated.
-David
Never mind. I'm such an idiot. Of course since I was concatenating the fields like that, the value was neither null nor "", but a single space. My check for a single space instead of a null value works just fine as expected. Hate it when the simplest things are overlooked.