Hello,
would someone please be so kind and help me with this problem.
i have this query that lists a number of order numbers on different rows however according to the query criteria the same order number may appear on many rows.
what i need to do is number these order numbers as follows
Order Number record number
123456 1
123456 2
123456 3
7890 1
7890 2
7890 3
and so on
please help
thanks
Lee-Anne
--
Message posted via http://www.accessmonster.com 5 1526
Lee-Anne Waters via AccessMonster.c om wrote: Hello,
would someone please be so kind and help me with this problem.
i have this query that lists a number of order numbers on different rows however according to the query criteria the same order number may appear on many rows. what i need to do is number these order numbers as follows
Order Number record number 123456 1 123456 2 123456 3 7890 1 7890 2 7890 3 and so on
please help thanks Lee-Anne
In a report you can create a running sum field that breaks on the order
number.
Does your table have an autonumber field? Such as OrderId? If so, you
could use DCount() to find all records with a matching order number
where the OrderID aunumber is less/equal the currecnt autonumber. Ex:
RecNum : DCount("OrderID ","OrdersTable" ,"OrderNumbe r = " & _
[OrderNumber] And OrderID <= " & [OrderID])
This adds overhead to your program.
Hi,
Thanks but that did not work :(
this is what i have so far in my query expression
DCount("OrderID ","Orders","Ord erNumber = " &[OrderNumber] And OrderID <= " & [OrderID])
please bear with me i'm new to this
--
Message posted via http://www.accessmonster.com
On Fri, 03 Dec 2004 01:54:08 GMT, "Lee-Anne Waters via
AccessMonster.c om" <fo***@AccessMo nster.com> wrote:
Try this:
DCount("OrderID ","Orders","Ord erNumber = " & [OrderNumber] & " And
OrderID <= " & [OrderID])
-Tom. Hi,
Thanks but that did not work :(
this is what i have so far in my query expression
DCount("OrderI D","Orders","Or derNumber = " &[OrderNumber] And OrderID <= " & [OrderID])
please bear with me i'm new to this
Thanks Tom,
that nearly worked. this is what i have now
OrderID OrderNumber RecordNumber
7225 1826964 1
7225 1826964 1
also ordernumber is a text field
thanks so much for this
Lee-Anne
--
Message posted via http://www.accessmonster.com
On Fri, 03 Dec 2004 03:20:23 GMT, "Lee-Anne Waters via
AccessMonster.c om" <fo***@AccessMo nster.com> wrote:
Text field values need to be wrapped in single-quotes:
DCount("OrderID ","Orders","Ord erNumber = '" & [OrderNumber] & "' And
OrderID <= " & [OrderID])
-Tom. Thanks Tom,
that nearly worked. this is what i have now
OrderID OrderNumber RecordNumber 7225 1826964 1 7225 1826964 1
also ordernumber is a text field
thanks so much for this Lee-Anne This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andy Glew |
last post by:
I have long looked for (and occasionally posted
questions to groups such as this about) a tool
that can take a group of HTML pages (nowadays
XHTML, or XML) and produce a nicely formatted
printable documented, featuring.
* pagination
* section numbering
* including Dewey decimal section numbering
such as Section 1.2.3 for H3
|
by: Dan |
last post by:
How can i find out what record number in the return set I am at?
Example select *,recnum() from foo I would like to see recnum() be 1
then 2,3,4,5 and so on for each record returned.
|
by: Grim Reaper |
last post by:
I know this should be easy (I think), but I can not figure out how to do
it.
Basically, I have 4 tables (2 tables with 2 subordinate tables) that
have an INQ_ID key that was created by using "Auto-increment".
(What I mean by 4 tables is that I have 2 "Main" tables with a
subordinate table tied to each of them.)
Now, I have to merge these tables so that I only have 2 tables (the data
|
by: systems analyst |
last post by:
This is my modification on an original solution posted by Trevor Best
(trevor@microprism.com) back in 1996.
Insert the following code in a Module in your Access data base.
Option Compare Database
Option Explicit
Dim mlngCounter As Long
Function ZeroCounter()
mlngCounter = 0
|
by: perryche |
last post by:
Experts,
I need your help in this tricky delima.
FormA without record number at the bottom but has a customized record
numbering with the following codes for "lblNavigate" label:
If Me.NewRecord Then
Me!lblNavigate.Caption = "New Record"
Else
With Me.RecordsetClone
| |
by: S. van Beek |
last post by:
Dear reader,
Is there a function to use in a query for numbering the records starting
with one (1) and then second (2) and so on?
Thanks for any help
|
by: jpatchak |
last post by:
Hello All,
I am trying to code a command button on a form to create a duplicate record and renumber it. The code I have in the command button currently is;
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
NumberNewRecord
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,...
|
by: vostrixos |
last post by:
Hi all I need some help.
I'm working on a project where i need to move on some records depending the value that the user chooses from a list box.I use the DoCmd.GoToRecord Like this:
"DoCmd.GoToRecord acDataForm, "ADV_FORM", acGoTo, LIST.Value"
Where LIST.Value is the primery key of a table and that's Auto Number.
The problem is that if the key has the value 8,the current record will be the 8th and not the record that has 8 as key...
|
by: Gord |
last post by:
If I have a form open with a subform control on it in datasheet view that
has its record source set to a query or a table, is it possible to determine
which record the user has clicked into with VB? I don't mean the text box
with which you can determine the field/column, but the record (row). I
guess what I'm looking for would be the bookmark? (or some line numbering?)
or whatever information would aid in determining unambiguously which...
|
by: Randoz |
last post by:
I have a simple data base with items that need to be worked on. Each record has a unique number assigned as a priority. The numbers are 1-100 for example, in the order that they are to be worked on. I want to be able to change record 50 form 50th priority to another priority (manualy) say to priority 5 and then change all records previously 5-49 to 6-50 priority and allows for the new priority 5. Any help on how to do this would be greatly...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |