Re: list a field based on a date

Tech-Archive recommends: Fix windows errors by optimizing your registry



The first one gives the same syntax error, but your second one works great!

"John Spencer" <spencer4@xxxxxxxxxxx> wrote in message
news:44593DB7.4F64DE47@xxxxxxxxxxxxxx
Would this work for you?

Owner: IIf(Info_SaleDate <= #10/31/2003#,[Info_NewOwner], [Info_FirstName]
& " "
& [Info_LastName])


If Info_NewOwner _NEVER_ has a value if Info_FirstName or Info_LastName do
have
a value then, you could even use

Owner: NZ(Info_NewOwner,[Info_FirstName] & " " & [Info_LastName])


Lila wrote:

I have a table that is a list of contacts.

Info_FirstName
Info_LastName
Info_NewOwner
Info_SaleDate

I need to create a query that shows the name and the sale date. The name
needs to show Info_FirstName, Info_LastName if the Info_SaleDate is
before
10/31/2003 and the Info_NewOwner if Info_SaleDate is after 10/31/2003.

I created a query and in the Field I wrote
Owner: IIf(Between Date(10/31/2003) And ( ) [Info_SaleDate]),
[Info_NewOwner], ([Info_FirstName] & " " & [Info_LastName]))

But I get an error The expression you entered contains invalid syntax.
I've
tried about a dozen different ways, but I still get the same message,
what
am I doing wrong?

--
Lila


.



Relevant Pages

  • Re: Please help ~ Syntax Error
    ... If this is not for a query, then you will need to change it to use ... The only time the error stops, see below, but then the report doesn't ... So perhaps I should try another approach, maybe my unbound form wasn't ... Syntax error in query expression '(Between ...
    (microsoft.public.access.formscoding)
  • Re: Calculating totals on a Crosstab Query
    ... you are getting closer qrysheds and qryTotal works ... syntax error in query Expression Count(IIf((Is ... FROM QDailyWheplingReport2 ...
    (microsoft.public.access.reports)
  • Re: Duplicate records ... sort of
    ... the query has come back with a syntax error ... FROM tblRegions as R INNER JOIN tblContacts as C ... FROM tblRegions INNER JOIN tblContacts ON tblRegions.RegionID = ...
    (microsoft.public.access.queries)
  • Re: Can I create a query (or any nifty easy way) to do this?
    ... I get is a syntax error for your example. ... The update query though still doesn't work at all. ... entry to Titles - that gives ... >>Basically the Furniture Table is a list of all possible ...
    (microsoft.public.access.queries)
  • Re: Combo box troubles
    ... I did use the query bldr ... under "Record Source" The form works fine. ... The syntax error come up in the combo box wizard after ...
    (microsoft.public.access.formscoding)