Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 881
  • Last Modified:

How can I stop the datasheet scrolling down to show dead space below the real data of the application?

How can I stop the datasheet scrolling down to show dead space below the real data of the application.  For example, in the screenshot below the last row of real data is ‘Diversion to Landline’ + ‘Saturday’, however I can scroll down to show all the dead space below this last line of real data.  
Q16-chart-1.jpg
0
Voodoo_chile
Asked:
Voodoo_chile
  • 7
  • 6
1 Solution
 
npinfotechCommented:
0
 
Jeffrey CoachmanMIS LiasonCommented:
I could not replicate your issue here.
The only time you should get a scroll bar is when there are more records on the form than can be displayed in the available area...

Again, ...can you first take a step back and explain the design details of the form?
0
 
Voodoo_chileAuthor Commented:
The real problem here is if the subform size is set to very large and there are less records in the subform, the scroll bar will be shown even if there is no record there. One of my solution is to count the records in the form recordset  and then dynamically set the height of the subforms. Is there any other way?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Jeffrey CoachmanMIS LiasonCommented:
Then something else it at play here...
In a normal subform in Datasheet view, if there are less records than will fit on the screen vertically, the vertical scroll bars should not appear.
(See attached Screenshot)
Is this the case with any subform you create?
(You can set the ScrollBar property of the subform itself to None, but this would prevent the scroll bar from appearing even if you needed it.)

You will have to state the design details of this form, including info on the recordset, ...or better yet post a sample of your database...
Sample database notes:
1. Back up your database(s).
2. Combine the front and back ends into one database file.
3. Remove any startup options, unless they are relevant to the issue.
4. Remove any records unless they are relevant to the issue.
5. Delete any objects that do not relate directly to the issue.
6. Remove any references to any "linked" files (files outside of the database, Images, OLE Files, ...etc)
7. Remove any references to any third party Active-x Controls (unless they are relevant to the issue)
8. Remove, obfuscate, encrypt, or otherwise disguise, any sensitive data.
9. Compile the code. (From the VBA code window, click: Debug-->Compile)
10. Run the compact/Repair utility.
11. Remove any Passwords and/or security.
12. Post explicit steps to replicate the issue.
13. Test the database before posting.

In other words, ...post a database that we can easily open and immediately see the issue, and if applicable, also include a Graphical representation of the Exact results you are expecting based on the sample data.


JeffCoachman
untitled.JPG
0
 
Voodoo_chileAuthor Commented:
The problem here is this form have a lot of records, and the form size is set for these record. However when the records are removed by another form, the number of the records in this form is changed as well; but its form size is not updated accordingly. Therefore my fix is  I resize this form when it is activated again to solve this problem. Thanks.
0
 
Jeffrey CoachmanMIS LiasonCommented:
Well this is all new info not posed in your statement....

I can't say that I full understand your reasoning behind this design...
Are you that based on your experience in designing databases that this system is the most efficient approach...?

This is why I requested a sample of the database...
0
 
Voodoo_chileAuthor Commented:
Updated
Thanks for reply. First of all, the sample pic have the unsed space called deadspace, and they should not be there. The requirement in my application is the size of the subform should be exactly match the size of the reoceds. Thanks.
0
 
Jeffrey CoachmanMIS LiasonCommented:
OK, I thought that your question was about how to deal with the scroll bar.
You stated:
<I can scroll down to show all the dead space below this last line of real data>

In the screenshot I posted I was NOT able to scroll down past the last record.
The empty space (Rows) were still visible, but with no records in them, there is no way to scroll down below the last record.
You are claiming that you *can* scroll down.

Note that my subform does not have a scroll bar, but your does...

This is why I would like to have a sample database.

I am almost out of time that I can dedicate to this one question.


JeffCoachman
0
 
Voodoo_chileAuthor Commented:
I have the same problem in the Horizontal bar as per screenshot.
How-can-remove-this-part.jpg
The sampe database file is
 TestSampe.accdb
0
 
Jeffrey CoachmanMIS LiasonCommented:
I needed a sample that simulated your data...
You posted a main form with a subform with no recordset, so I could not add any records to your subform.

In any event: ...
1. There is nothing you can do about the deadspace "rows"
This is the way forms in Access are designed to function.

2. To get rid of the horizontal scrolling you must make the subform wide enough to display all of the columns (no horizontal scroll bar present).  Either by making the subform wider so that all the columns fit.
Or reduce the size of the columns until they all fit within the subform.
(or a combination of both)
See: frmMain in my modified sample

3. To eliminate both issues altogether, ...use a Continuous (Tabular) subform with all the controls butted up against each other. (this simulates a Datasheet form)
See: frmMain2 in my modified sample

JeffCoachman




TestSampe.accdb
0
 
Voodoo_chileAuthor Commented:
Thanks for your database. However because I have more requirements from my application, it is not easy as your example. There are still two problems here:
1. I do not think I can make the subform wider enough, because the columns can be very wide and some end-user use the laptop (their screens will be small), the horizontal scroll bar will definitely appear there.
2. It is a good suggestion to use the continuous forms rather datasheet. However the problem is the columns in my datasheet are actually not fixed. Some of them will be hidden in some conditions. In datasheet view, I can use  Me.Subform.Controls(“colName”).ColumnHidden = True to hide them and then adjust the form width, but it is not easy to do it in the continuous forms.
0
 
Jeffrey CoachmanMIS LiasonCommented:
<However because I have more requirements from my application, it is not easy as your example.>
Well, neither of these things were mentioned in your original post...
In the future, please list all of your requirements and constraints, so Experts do not spend too much time working on solutions that are not applicable.


Then AFAICT, (with these new requirements), you may be out of luck on both fronts.
The answer to your questions appear to be:  This cannot be done directly.

You may just have to live with these default attributes.
Remember that these attributes have been the way Access forms have worked for years, so I can't see how they can be deal breakers here.

JeffCoachman

0
 
Voodoo_chileAuthor Commented:
The answer for this question is it cannot be achieved.
0
 
Jeffrey CoachmanMIS LiasonCommented:
ok
;-)

Jeff
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now