I am developing in VB6 and using MS SQL 2000 as the database engine.
My shipping SQL table has the following fields
1. ContainerReference
2. BoxSize
3. Product
4. BoxReference
For the query I want to know how many of each Box-Size is scheduled for a specific container.
Each box has a unique Reference
I have tried multiple variations of
My problems:
1. I am not sure if I have the correct SQL SELECT syntax
2.How do I access the results of the query to create a textbox showing for example:
3. Can I use the "totpersize" to identify the quantity?
My shipping SQL table has the following fields
1. ContainerReference
2. BoxSize
3. Product
4. BoxReference
For the query I want to know how many of each Box-Size is scheduled for a specific container.
Each box has a unique Reference
I have tried multiple variations of
Code:
SumStr = "SELECT count(BoxReference) AS totpersize " _
& "FROM shipping WHERE ContainerReference = '" & Con.text & "'" _
& " GROUP BY BoxSize
Set SumrS = connDB.Execute(SumStr, , adCmdText)
debug.print "ContainerReference: " & con.text
Do Until SumrS.EOF
Debug.Print SumrS.Fields(0).value, SumrS.Fields(1).Value
SumrS.MoveNext
Loop
1. I am not sure if I have the correct SQL SELECT syntax
2.How do I access the results of the query to create a textbox showing for example:
3. Can I use the "totpersize" to identify the quantity?
Code:
ContainerReference: Xo27354
Boxes Count
===============
2x4 75
4x8 30
12x6 124