I need to know the first line of a matched Query

JesseH

Registered User.
Local time
Today, 09:47
Joined
Apr 24, 2009
Messages
44
I have two files that match on customer number and order number. Is there a way that I can identify the first line matched. For example, Customer 1 has twentry orders. I will get twenty lines of data. Is there a way to "mark" the first Order. Can not do on order number because order numbers are not sequential. I need to know that there is a customer break and when there is, write a marker in that record.

I hope I have explained the issue.

Any help would be greatly appreciated.
Thanks
 
How are you defining FIRST order? Access doesn't store data in any particular order (think a big bucket where everything gets thrown and it can shift around). So, if you want a specific order (like the very first order a customer placed) then you will need to provide a field to sort on like a date or date/time stamp.
 
Thanks for trying. I was afraid that was going to be the answer, but I had to try. Thanks for the help.
 
Well, don't give up just yet, what marks your order as the first one? Is there a date? As Bob said, the lines in access aren't always sequential... So even if you are looking at your table, it isn't guaranteed that they show in "order" of how you entered them.
 
There is no difference in orders. I cheated, I have written a quick VBA program to mark the record when the customer changes. I did not want to do this because I would have to change the program when fields change. But at least, for now, I got pass this.

Thanks for the effort.
 
There is no difference in orders. I cheated, I have written a quick VBA program to mark the record when the customer changes. I did not want to do this because I would have to change the program when fields change. But at least, for now, I got pass this.

Thanks for the effort.

When I read the statement marked in RED above, I could not help but think that your design might not be as normalized as it could be. If you are able to show us the design, then perhaps we could help to suggest an alternate approach?
 
I will be glad to provide, after the storm passes. For now, it works.
Thanks Again for all the help.
 

Users who are viewing this thread

Back
Top Bottom