Hi Bob,
Your are welcome.
If I understand what is going on; try moving the last paranthesis to
the end. However, as I look at it a bit more, you may be able to simplify
the statement. Assuming that you want just
OwnerName
when funGetHorse(tblInvoice.InvoiceID,0)=' '
or
OwnerName / funGetHorse(tblInvoice.InvoiceID,0) / ClientDetail
when funGetHorse(tblInvoice.InvoiceID,0)<> ' ' change your statement to
OwnerName: tblInvoice.OwnerName & IIf(funGetHorse(tblInvoice.InvoiceID,0)='
', '', ' / ' & funGetHorse(tblInvoice.InvoiceID,0) & ' / ' &
tblInvoice.ClientDetail)
Clifford Bass
"Bob Vance" wrote:
> Thanks, Would be good if [& ' / ' & tblInvoice.ClientDetail] Only appears if
> there was no funGetHorse
> Regards Bob
>
>
> "Bob Vance" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Thanks Clifford Billiant,any chance of dropping the '/' if there is a
> > funGetHorse because if there is a funGetHorse there will be no
> > ClientDetail
> > so in that case I am getting : Owner / funGetHorse /
> > regards Bob
> >
> > "Clifford Bass" <(E-Mail Removed)> wrote in message
> > news:9A89DD60-D135-4FA4-953D-(E-Mail Removed)...
> >> Hi Bob,
> >>
> >> First off, it may be better to use the concatenate operator, which is
> >> the ampersand (&). That will avoid any confusion as to whether you are
> >> wanting to add or concatenate. Then just add the stuff you want onto the
> >> end:
> >>
> >> OwnerName: IIf(funGetHorse(tblInvoice.InvoiceID,0)='
> >> ',tblInvoice.OwnerName & '
> >> ' & funGetHorse(tblInvoice.InvoiceID,0),tblInvoice.OwnerName & ' /
> >> ' & funGetHorse(tblInvoice.InvoiceID,0)) & ' / ' &
> >> tblInvoice.ClientDetail
> >>
> >> Hope this helps,
> >>
> >> Clifford Bass
|