Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2007

Tip: Looking for answers? Try searching our database.

Sizing queries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Selby - 15 May 2007 18:34 GMT
I am using 2007 and the queries that I run contain several blank columns.  I
have tried to delete these columns in design view but they still appear when
the query is run.  How can I get my query to just show the info I need and
not these extra blank columns?  

Thanks!
Jerry Whittle - 15 May 2007 19:21 GMT
Please show us the SQL statement for the query in question.
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> I am using 2007 and the queries that I run contain several blank columns.  I
> have tried to delete these columns in design view but they still appear when
> the query is run.  How can I get my query to just show the info I need and
> not these extra blank columns?  
>
> Thanks!
Selby - 15 May 2007 19:31 GMT
I should have clarified - the extra blank columns appear at the end of the
query.

SELECT Tags.TagCode, Tags.TagID, Tags.TagDate, qryItems.ItemNumber,
qryItems.ItemDescription, UnitTypes.UnitType, TagCanCodes.CanCode,
Sum(-([QtyShipped])) AS TotQtyShipped, TagShippingInfo.ShipDate,
TagShippingInfo.[Invoice#/NewPalletTag#]
FROM UnitTypes INNER JOIN ((qryItems INNER JOIN Tags ON qryItems.ItemNumber
= Tags.ItemNumber) INNER JOIN (TagCanCodes INNER JOIN TagShippingInfo ON
TagCanCodes.TagCanCodeID = TagShippingInfo.TagCanCodeID) ON Tags.TagNum =
TagCanCodes.TagNum) ON UnitTypes.UnitID = Tags.UnitType
GROUP BY Tags.TagCode, Tags.TagID, Tags.TagDate, qryItems.ItemNumber,
qryItems.ItemDescription, UnitTypes.UnitType, TagCanCodes.CanCode,
TagShippingInfo.ShipDate, TagShippingInfo.[Invoice#/NewPalletTag#],
Tags.TagNum, Tags.ItemNumber
HAVING (((Tags.ItemNumber)=[Enter ItemNumber]))
ORDER BY TagCanCodes.CanCode;

> Please show us the SQL statement for the query in question.
>
[quoted text clipped - 4 lines]
> >
> > Thanks!
Jerry Whittle - 15 May 2007 21:48 GMT
Hi,

I count 10 columns that should be returned. Are there more than this? If so,
what does their column headings say?

I noticed that you are grouping on two columns ( Tags.TagNum and  
Tags.ItemNumber) that aren't in the Select. Still this shouldn't cause blank
columns to show up. Are you sure that they aren't filled with null values?

I hate seeing field names with special characters, including blanks, as it
could cause problems. Without the square brackets, [Invoice#/NewPalletTag#]
could be interpeted as trying to divide two other fields or a time field or
both. In the future avoid special anything that isn't a 123 or abc. The
Underscore  _  is OK.
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> I should have clarified - the extra blank columns appear at the end of the
> query.
[quoted text clipped - 22 lines]
> > >
> > > Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.