473,402 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Help Needed With Format Of Query Expression

I'm using the following expression in the query grid to show the Month
and Year of the date field "TxtDate":

Week: Format([TxtDate],"ww yy",4)

I am grouping the results on this field.

Is there a different way that it can be formatted so that when I sort
the field it will sort by Week and Year e.g.

01 07
02 07
03 07

At the moment it is sorting as a text field:

01 07
10 07
11 07

I can't simply sort by the "TxtDate" field because it isn't part of an
aggregate function and if I Group on TxtDate or use Min or Max the
query gives undesired results.
Jun 27 '08 #1
1 1352
On Apr 30, 3:40*pm, "Larry Linson" <boun...@localhost.notwrote:
Format yields a text field. *If you obtain the week and year via formatting,
they will BE text and sort as text. *You can convert them to numeric with
the CInt or Val function, or you can calculate them instead of using the
Format statement/function to obtain them. I suspect the former will be
simpler than the latter.

*Larry Linson
*Microsoft Office Access MVP
Thanks Larry.
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
5
by: Alicia | last post by:
Hello everyone based on the data, I created a union query which produces this. SELECT ,,, 0 As ClosedCount FROM UNION SELECT ,, 0 AS OpenedCount, FROM ORDER BY , ;
1
by: ED | last post by:
I am currently developing a database that will spit out job completion stats each day of a given month. I have a table that has lists the number 1 through 31. I am using this as a static table. ...
1
by: Terencetrent | last post by:
I am trying to format a query expression drawn from a dialog box as percent. The original statement to get the value for the query is as follows: New%markup: !! The dialog box looks the...
4
by: T. Wintershoven | last post by:
Hi Can someone please tell me whats wrong with the last line of the query below. The first three lines work fine but when i add the fourth line i get an error message (see text at ERROR...
7
by: rguarnieri | last post by:
Hi! I'm trying to create a query with a boolean expression like this: select (4 and 1) as Value from Table1 this query return always -1, but when I make the same calculation in visual...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
5
by: atiq | last post by:
i am trying to update a field within a table. But i dont want to update the whole of the data within the field just one part of it. The field is the Tutor Group for students in the format 7B, 7D,...
4
by: juster21 | last post by:
I am trying to run this query... strSql = "SELECT * FROM tblMain WHERE (((tblMain.Verifier_ID)='" & lstVerifier.SelectedItem & "') AND ((tblMain.Week_Ending_Date)='" &...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.