J
JohnE
Hello. I have a button on a form that exports the information from
Access2007 to Excel2007. The exporting process works fine with the exception
of truncating a field that is longer then 255. The truncating comes from the
Group By in the sql below. If I take out the Group By, there is no
truncating issue. But a group of users need to have Group By in. But a
group needs to see all the info in the field. I added the FIRST to the field
that truncates and removed it from the Group By line. But the field still
truncates. Here is the sql that is not working.
sql = "SELECT ItemNumber, PartNumber, PartNumberMajorRevision, Description,
Quantity, First(ReferenceDesignator) AS FirstOfReferenceDesignator,
ManufacturerName, ManufacturerPartNumber"
sql = sql & " FROM PartsPerAssemblyWithManufacturersInfoQ"
sql = sql & " WHERE [AssemblyNumber] = '" & PartNumber & "' "
sql = sql & " AND [AssemblyRevision] = '" & cboViewRevision & "'"
sql = sql & " AND ItemNumber <> 0"
sql = sql & " Group BY ItemNumber, PartNumber, PartNumberMajorRevision,
Description, Quantity, ManufacturerName, ManufacturerPartNumber"
sql = sql & " ORDER BY " & order_by
Can please some of the people some of the time but can't please all the
people all of the time. Can anyone see what is wrong or have an alternative
method?
Thanks... John
Access2007 to Excel2007. The exporting process works fine with the exception
of truncating a field that is longer then 255. The truncating comes from the
Group By in the sql below. If I take out the Group By, there is no
truncating issue. But a group of users need to have Group By in. But a
group needs to see all the info in the field. I added the FIRST to the field
that truncates and removed it from the Group By line. But the field still
truncates. Here is the sql that is not working.
sql = "SELECT ItemNumber, PartNumber, PartNumberMajorRevision, Description,
Quantity, First(ReferenceDesignator) AS FirstOfReferenceDesignator,
ManufacturerName, ManufacturerPartNumber"
sql = sql & " FROM PartsPerAssemblyWithManufacturersInfoQ"
sql = sql & " WHERE [AssemblyNumber] = '" & PartNumber & "' "
sql = sql & " AND [AssemblyRevision] = '" & cboViewRevision & "'"
sql = sql & " AND ItemNumber <> 0"
sql = sql & " Group BY ItemNumber, PartNumber, PartNumberMajorRevision,
Description, Quantity, ManufacturerName, ManufacturerPartNumber"
sql = sql & " ORDER BY " & order_by
Can please some of the people some of the time but can't please all the
people all of the time. Can anyone see what is wrong or have an alternative
method?
Thanks... John