A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sorting a table by concatenating several fields in the same table



 
 
Thread Tools Display Modes
  #1  
Old March 6th, 2005, 02:33 AM
salsaguy
external usenet poster
 
Posts: n/a
Default Sorting a table by concatenating several fields in the same table

I am creating a database to store information about printed media. For
example, a single table with separate fields for title, author, publisher,
citations, date of publishing, etc. I want the user to choose what fields to
sort with, so that he can select a first field to sort by and a second field
to further sort any identical entries in the first field. Ideally, I want to
allow the user to select up to three fields for sorting. I would prefer to
accomplish this using VB. I am using Access 2002.

I have had no problem sorting the data with one selected field by making a
query with the Order By statement. But I have not been able to implement the
sorting with multiple fields. I have an idea that I believe would allow me
to continue using the Order By statement and still let the user define up to
3 fields (although I have not been able to implement it). I would create a
separate field for sorting that would be left blank. When the user selects
the fields for sorting, then those fields would be copied into the sorting
field and concatenated. I could then run a single query with the Order By
statement on the sorting field and, in effect, sort with all 3 fields taken
into account. Then after the sorting has taken place I would need to erase
the concatenated fields from the sorting field.

I would be interested in any help or code. This is my first project with
Access, and although I do have some background in C++, I am learning the VB
and SQL as I go. Thanks...


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update Tables using forms achett Using Forms 5 January 28th, 2005 01:25 AM
Update - If statement Dan @BCBS Running & Setting Up Queries 13 December 14th, 2004 07:02 PM
Manual line break spaces on TOC or Table of tables Eric Page Layout 9 October 29th, 2004 04:42 PM
Automatic filling of fields in table two from table one Jim Kelly Database Design 1 September 27th, 2004 10:16 PM
Autonumber Ally H. General Discussion 7 August 27th, 2004 04:51 PM


All times are GMT +1. The time now is 04:26 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.