Re: Sorting Question, Please Help!

From: Rick B (anonymous_at_discussions.microsoft.com)
Date: 06/29/04


Date: Tue, 29 Jun 2004 15:11:37 -0500

You need to correct your table design. Add new fields called "FirstName"
and "LastName" Build an update query to take everything up to the space and
update it to the FirstName field and everything after the sapce and place it
in the LastName field. Then delete your original name field.

Rick B

"Paul" <Paul@discussions.microsoft.com> wrote in message
news:4FC8DF42-C66A-4E21-A9CC-0F2D577EAB8A@microsoft.com...
I'm running a simple report off of a query that shows a particular group of
users. However I've been informed that it would be convenient if the names
on the report were sorted by Last Name, First name. My problem is I
converted this database from an old nutplus system and put it into access,
but the field for entering a name was not split and contains the
individual's full name instead of a split version which I need to sort the
query. My idea was to take the existing name in each field of the table and
change the format from "John Doe" to "Doe, John" this way i could easily
sort the query by Last Name. Of course that would require manually
re-formatting each name in the table. Is there a way to tell Access to swap
the Last Name with the place of the First Name and put a comma in between
them? Or am I shooting in the dark here? Would there be an easier way to
do this? Any help or ideas would be greatly appreciated.

Thanks in advance.
Paul



Relevant Pages

  • Re: To change negative to positive in MS Access
    ... If you want to use the UPDATE query method and you will be importing new data into the table, ... UPDATE query that will only change the numbers that haven't been changed. ... changed data or if it is new, unchanged data and then build your UPDATE ...
    (microsoft.public.access.queries)
  • Re: Update query after an append query?+
    ... computer so that I could tell when and if I get the update query to work. ... that if you created your query under a different ANSI SQL query mode than ... the current mode of your Microsoft Access database then your update query ...
    (microsoft.public.access.formscoding)
  • Re: Append import data to existing record
    ... I'm glad you've got the key query working. ... With the update query open in Design View: ... Split the filespec apart and reassemble it into a ... Function BuildJetTextSource(ByVal FileSpec As String, ...
    (microsoft.public.access.externaldata)
  • Re: To change negative to positive in MS Access
    ... Rick's method is just a calculated field in a SELECT query. ... Klatuu's method is an UPDATE query and it WILL change your underlying data. ... If you are importing, this can be done using the update method, but it can be a little tricky. ... you are importing data from an external source and this field is negative in these source files, ...
    (microsoft.public.access.queries)
  • Re: merging data
    ... Whether you use an append query (copy data from one table / query to another ... you'd use an append query. ... One says to use an> append query, the other an update query. ... >>> have lists of product groups that compose these 5000 ...
    (microsoft.public.access.externaldata)