Query Problem

It would help if you put the Excel data into Access and then uploaded a copy of your database.
 
WHY does it make sense to use one of three different fields as the identifier? Also, given that two of them are dates, how is the user to know which date is being used?

If all you want to do is to sort, just use a query to sort on the three columns as you have identified them.
 
Forget any system complexity about the previous example. What I need to make is putting data in ascending order under three conditions:
1- Date Entrance
2- Date Registration
3- Shipment Code
If duplicate date entrance, THEN add date registration, If duplicate date registration, THEN add shipment code.
I need to apply what in the attached image in Access.
And sorry if I make any confusion in my previous example.
Sorting is done on a group of records, if you are checking for the duplicate occurrence of a field value, e.g date entrance, before determining the sort order, this condition already limits the records that will meet the condition, and in some instances, only one record will meet the criteria.

Your excel sample sorts first by date entrance, then by date registration, and then by shipment code, no criteria for looking for duplicate values before sorting is applied.

The excel picture depicts a different thing from what you have explained.
 
Do answer this question.
No, not from combo box

I’ll explain below and kindly find the attached file:

Forget any system complexity about the previous example. What I need to make is putting data in ascending order under three conditions:
1- Date Entrance
2- Date Registration
3- Shipment Code
If duplicate date entrance, THEN add date registration, If duplicate date registration, THEN add shipment code.
I need to apply what in the attached image in Access.
 

Attachments

  • Data.jpg
    Data.jpg
    231.4 KB · Views: 125
Do answer this question.

Do answer this question.
No, no combo box.
I need to apply the below example in Access:
What I need to make is putting data in ascending order under three conditions:
1- Date Entrance
2- Date Registration
3- Shipment Code
If duplicate date entrance, THEN add date registration, If duplicate date registration, THEN add shipment code.
 

Attachments

  • Data.jpg
    Data.jpg
    231.4 KB · Views: 123
No, not from combo box

I’ll explain below and kindly find the attached file:

Forget any system complexity about the previous example. What I need to make is putting data in ascending order under three conditions:
1- Date Entrance
2- Date Registration
3- Shipment Code
If duplicate date entrance, THEN add date registration, If duplicate date registration, THEN add shipment code.
I need to apply what in the attached image in Access.
Hi. I created a table with your data in Access, and it looks like this.
1639962270026.png

Is that correct? If so, I then created a query based on that table, and the result looks like this.
1639962318424.png

Is that correct? If so, this is the SQL statement I used.
SQL:
SELECT SampleData.ShipmentName, SampleData.DateEntrance, SampleData.DateRegistration, SampleData.ShipmentCode
FROM SampleData
ORDER BY SampleData.DateEntrance, SampleData.DateRegistration, SampleData.ShipmentCode;
Hope that helps...
 
Hi. I created a table with your data in Access, and it looks like this.
View attachment 96994
Is that correct? If so, I then created a query based on that table, and the result looks like this.
View attachment 96995
Is that correct? If so, this is the SQL statement I used.
SQL:
SELECT SampleData.ShipmentName, SampleData.DateEntrance, SampleData.DateRegistration, SampleData.ShipmentCode
FROM SampleData
ORDER BY SampleData.DateEntrance, SampleData.DateRegistration, SampleData.ShipmentCode;
Hope that helps...
Clear, definite, and excellent. Thank you so much.

I got another problem hope to help me in it.
When entering a new product in the month it has a new serial number. This number increments with every new product till the end of the month. A new product in the new month will get a new serial beginning from 1 again.
I need to apply it to the year to.
A serial number resets in the start of every month and every year as well.
Find the attached.

Thank you in advance for your help.
 

Attachments

  • Increment.png
    Increment.png
    6 KB · Views: 119
If you started a new thread, as your last post has nothing to do with this post, you would see Similar Threads at the bottom of the page, as this question is asked time and time again.? Right now because you have hijacked your thread, none of the threads are of any use?
 

Users who are viewing this thread

Back
Top Bottom