Re: Populate a field by query

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



On Sun, 6 Jan 2008 18:39:00 -0800, Matt <Matt@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:



"John W. Vinson" wrote:
Just put Ascending on the date/time field's Sort row in the query grid.

Already done!

<puzzlement> so is it not working?

One last thing regarding this box if I may...... Is there a way to not show
duplicate calls?

Set the Unique Values property of the query to Yes. Perhaps you could post the
SQL view of the query, indicate what it's showing, and what you want it to
show.

sql view:

SELECT DISTINCT [Call] & IIf([Mobile],"/m","") & IIf([check]," - check","")
AS ShowCall
FROM net
WHERE ((([Call] & IIf([Mobile],"/m","") & IIf([check]," -
check",""))>=Date()))
ORDER BY net.time DESC;

It was working now I am getting an error #3093. As you saw I posted last
night at 3am. Wasn't really clear headed <grin>. I am showing calls from a
couple days ago when I started this. Maybe I need to step back and look at
it from the beginning.

You're comparing the call letters to today's date... apples to bicycles, not
just apples to oranges!

The WHERE clause should be something like

WHERE net.[time] >= Date()

and should not refer to the Call calculated field at all.

If you're using it for a combo box, do you really want the rows sorted by the
time that the call came in? Maybe you need to sort by the Call field instead.

John W. Vinson [MVP]
.



Relevant Pages

  • Re: Hiding dates Query fields
    ... "John W. Vinson" wrote: ... My query selects all the records that I want. ... John W. Vinson [MVP] ...
    (microsoft.public.access.gettingstarted)
  • Re: help writing query to sum groups
    ... "John W. Vinson" wrote: ... query everytime i add a product. ... please open the query in SQL view and post the SQL ...
    (microsoft.public.access.queries)
  • Re: set first record to zero in a calculated field
    ... John, after playing around with the FOrmat comand, I think I managed to get ... I resolved it in my previous query by using the Format command in the SQL, ... Center for Health Program Development and Management ...
    (microsoft.public.access.queries)
  • Re: SQL view - not user-friendly
    ... John W. Vinson wrote: ... I've even tried using UltraEdit to create a SQL style, ... F5 executes the code 'on-the-fly' as it were with no need to 'create' a new query. ...
    (microsoft.public.access.queries)
  • Re: Import and append a column from excel to an existing db
    ... John W. Vinson writes ... OK Here's the SQL for the update version of the query, ...
    (microsoft.public.access.gettingstarted)