473,394 Members | 1,709 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,394 software developers and data experts.

Sort Query

I have been struggling with the Dcount function. I have a table created through the make table query. The fields are ORDERNO( TEXT FIELD) INVOICEDATE AMOUNT. The order numbers are grouped together by date in ascending order. All I need is a sequential numbering of the records to be created when the make table query is activated through a macro. Is there a SQL code in MS access that can be set to activate either during the table creation or atleast after the table is created. The name of the table is PAYMENTS. Can somebody assist please
Jun 29 '11 #1
8 2588
NeoPa
32,556 Expert Mod 16PB
You can run a query (SQL) any time, that you can design to show all (or just a specified set of) records in an order you specify.

What you require isn't too clear, but if you know which fields you require in the sorting then simply select Ascending or Descending for those fields in the Sort row of the design grid.
Jun 29 '11 #2
I was only looking for a dcount function in a query to get a sequential number for the records for a table created and already sorted in a certain order.
Jun 30 '11 #3
NeoPa
32,556 Expert Mod 16PB
I don't understand what you're talking about. Please be more clear if you can.
Jun 30 '11 #4
Rabbit
12,516 Expert Mod 8TB
It sounds like they're looking for a way to number the records from 1 to n.
Jun 30 '11 #5
Rabbit, you are right. I just need to number the records sequentially at the make table query stage itself
Jul 1 '11 #6
Rabbit
12,516 Expert Mod 8TB
If you're using it in a report, just use a running sum.
Jul 1 '11 #7
Rabbit
Thanks but I wanted these sequential numbers on the table since I had to create running totals too for the records and there were different order groups etc where a new running sum for each order group was required. However I found another solution and managed. Thanks again for your time. Now I have one more question.
** Edit **
Question removed that has been asked in another thread (Insert Month).
Jul 2 '11 #8
Rabbit
12,516 Expert Mod 8TB
This is a different question and should be posted in a new thread. Also, please post your solution for this question so that others who are looking for the same thing can find the answer.
Jul 2 '11 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: jdph40 | last post by:
I posted this problem previously and received excellent help from Wayne Morgan. However, I still have an unanswered question. My form (frmVacationWeeks) is opened from the OnClick event of a...
1
by: Dan Leeder | last post by:
stroccur = DCount("", "empnotes", " = " & Chr(34) & Me.Rpt_Card_Type & Chr(34) & " And = " & Me.SSN & " And #" & & "# > " & DateSerial(Year(Me.datetime) - 1, Month(Me.datetime),...
1
by: SheldonMopes | last post by:
I'm having difficulty with the DCount function, not getting the results that I want. Field1A and Field2A are fields in TableA matching Field1B and Field2B in TableB Using a calculated...
1
by: Geoff | last post by:
FrmBookings is a subform linked to the form FrmParty. The DCount function checks for previous bookings and it works fine but why do I need such a long-winded syntax ie Forms!.Form!! in the...
1
by: lalbee | last post by:
I am trying to use the Dcount function but receive a data type mismatch error, can someone help me determine the cause? Count: DCount("","qry-final everhome results"," <'0' ") Thanks!
5
by: neelesh kumar | last post by:
sir, i am struggling with a problem in my code.The code is Dim subcode as Variant,intnoofsubquestions(4) as integer,i as integer subcode = Array("ma","phy","che","ece") 'Msgbox myArray(2)...
36
by: bmyers | last post by:
Good afternoon, I am attempting to count only those records within a report, which is based on a query, where Status is equal to Closed. I have tried multiple variations of DCOUNT but am...
1
iBasho
by: iBasho | last post by:
Hi I am using the DCount function to check and alert users for existing IDs in my database after a new record is entered. ..Private Sub CARDID_AfterUpdate() If DCount("*", "", " = '" & Me. &...
2
by: flower88 | last post by:
Hello, I'm trying to get rid of duplicate entries for contacts. So in my contact entry form when the save buttom is clicked I want to use the DCount function to see if there are duplicates. Here...
1
by: Manuel Baptista | last post by:
Good afternoon, I am attempting to count those records within a data base that do not match one variable answer in a given field. To put it more clearly, I want to count the companies in a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.