I’ve created a DB for a customer. I’ve executed a particular form at least 100 times on my computer and it has always executed properly. On my customer’s computer, it will not execute properly all the time. I’ve been unable to determine what is causing the problem.
Here are the details:
Table Name: tbl Export IPG Orders
Fields: Group 1 – text
Group 2 – text
Order Number – long integer
Group Type – long integer
The Group Type is either 1, 2, or 3.
Here my statement:
DoCmd.RunSQL "INSERT INTO [tbl Export IPG Orders - 2nd] ( [Group 1], [Group 2], [Order Number], [Group Type] ) SELECT [tbl Export IPG Orders].[Group 1], [tbl Export IPG Orders].[Group 2], [tbl Export IPG Orders].[Order Number], [tbl Export IPG Orders].[Group Type] FROM [tbl Export IPG Orders] ORDER BY [tbl Export IPG Orders].[Order Number], [tbl Export IPG Orders].[Group Type]"
What this is supposed to do is insert all 4 fields into a table using the Order Number as the first ascending sort and the Group Type as the second ascending sort
Here’s an example of what the table should look like:
Group1, group2, 123456,1
Group1, group2, 123456,2
Group1, group2, 123456,3
Group1, group2, 123457,1
Group1, group2, 123457,2
Group1, group2, 123457,3
My problem is sometimes the sort does not work properly. Here’s an example
Group1, group2, 123544,2
Group1, group2, 123544,3
Group1, group2, 123545,1
Group1, group2, 123545,2
Group1, group2, 123545,3
Group1, group2, 123456,1
Group1, group2, 123456,2
Group1, group2, 123456,3
I can’t figure out what is happening. It’s not consistent. Thanks for your assistance!!