hide extra columns in datasheet form (1 Viewer)

overworked

New member
Local time
Today, 02:06
Joined
Nov 20, 2012
Messages
7
I have a subform, sbfMeals, that is in datasheet format. The problem is that although I only have four columns of data, I have extra columns that are empty.

Column 1...Product
Column 2...Qty
Column 3...Price
Column 4...Total

Then there is column 5,6,7,8 that have nothing in them. The only way that I would know, is because a horizontal scroll bar shows up even after I have told the form no scroll bars.

Is there anyway to get rid of the extra columns, hopefully I won't have the horizontal scroll bar then.

Using Access 2010
 

pr2-eugin

Super Moderator
Local time
Today, 10:06
Joined
Nov 30, 2011
Messages
8,494
Remove them from the SubForm's RecordSource, if you do not wish to see them and not use them in your data modifications.. If you want it to be included but not displayed, then you have to play with the design.
 

dstone10

Registered User.
Local time
Today, 05:06
Joined
Nov 19, 2012
Messages
23
I have this same issue, along with another that hasn't got a response yet.

Overworked, if I understand you correctly those blank columns are just there, kind of like they would be in Excel. You have no data in them, they are not essential to your table at all, they're just flat out empty space. Including the column headers.

Basically, in datasheet format we are getting extra columns that are just there. They are not in the record source (my record source is a query with specific fields being called).

Design view does not have anything that I can tell to omit the extra blank columns in datasheet view. In design view there are no extra blank rows to remove. Just the fields I selected in my query.

Hope someone can shed some light on this and maybe my other question in another post.

Thanks guys!
 

overworked

New member
Local time
Today, 02:06
Joined
Nov 20, 2012
Messages
7
Dstone, you are exactly right. The only data in the RecordSource is the product, Qty, Price and Total.
 

jdraw

Super Moderator
Staff member
Local time
Today, 05:06
Joined
Jan 23, 2006
Messages
15,379
Did you realize that the post you responded to is from Nov 2012?
 

maw230

somewhat competent
Local time
Today, 04:06
Joined
Dec 9, 2009
Messages
522
Yep. Can't find anything on this. These guys are the closest I've found to my situation.
 

ravidcurious

New member
Local time
Today, 14:36
Joined
Dec 16, 2013
Messages
7
Hey guys,

Good news for you all. i was also facing the same problem and got the solution after doing some hit and trial. The main problem is that width of subform window is smaller to what is reqired to display all columns in one shot. Please follow below steps:

1. Open subform in datasheet view.
2. Select all columns > right click > make column width to best fit. (Just to make sure that columns are not more wide other than what is required for the data in the column)
3. Open main form in design view and make width of subform window such that it can hold the exact width of all columns. (Or initially you can make it extra wide then check in form view how much extra space is comming, then shrink the window accordingly from design view)

Let me know if you have any other doubt on this.
 

Users who are viewing this thread

Top Bottom