Re: SQL Question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Graham Mandeno (Graham.Mandeno_at_nomail.please)
Date: 02/23/04


Date: Tue, 24 Feb 2004 09:36:39 +1300

Hi Dan

In this case you could use the Format property of the field, or of the
control on the form where it is displayed. Use the format:
    ;\X;'';
to display "X" if the field is True, otherwise blank.

-- 
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand
"Dan M" <dannerinoremove@aol.com> wrote in message
news:1551301c3fa47$27a6a300$a501280a@phx.gbl...
> Using Access XP project with SQL Server 2K data.
>
> I need a way to manipulate the output of my queries and/or
> SQL statements to display conditional output.  In my
> Access 97 Jet database, I could insert an IIF statement to
> control output based on the result of a test condition.
> XP adp files don't seem to have this ability.
>
> As a SQL statement for a list box, this used to work:
>     SELECT EmployeeName, IIF([Terminated]=-1, 'X', '') As
> Active FROM tblEmployees;
>
> If I attempt to insert the IIF condition in the Access
> QBE, it converts the whole thing to a literal string.  If
> I insert the above SQL string manually, it
> returns "Invalid SQL Statement. Check the server filter..."
>
> If the IIF statement is no longer available for
> conditionally outputting information in a listbox column,
> is there another way?  And remember, this has nothing to
> do with VBA, so SELECT CASE won't work.


Relevant Pages

  • Re: Get Values SQL in table
    ... > data set in the text box, ... > can take the results of the query and display them in columns. ... > is only capable of displaying the actual text string, ... within the SQL statement or the table that is the data source. ...
    (microsoft.public.access.modulesdaovba)
  • Re: How do I select a certain number of records randomly from a ta
    ... No, it is supposed to be a SQL statement, although I forgot to put the field ... You don't indicate where you want to display these questions when you are ... If you have a database of addresses, ... Dale ...
    (microsoft.public.access.queries)
  • RE: Multiple comboboxes filtering each other
    ... I would like my search form to be seperate from my display form; ... you could concantenate the First and Last name with a SQL statement ... This would display them in two separate columns, ... First Name, and are trying to set up a multi-parameter search form, Allen ...
    (microsoft.public.access.forms)
  • ANN: Request & Response - Update Notice - 1.0.1.3
    ... Request & Response that offer several new features as well as correcting ... -Added display of active SQL Statement if loaded from Repository ... -Added option to save current SQL statement on exit to user login SQL ...
    (borland.public.delphi.thirdpartytools.general)
  • SQL Question
    ... Using Access XP project with SQL Server 2K data. ... SQL statements to display conditional output. ... I could insert an IIF statement to ... As a SQL statement for a list box, ...
    (microsoft.public.access.formscoding)