how to hide part of the form

H

homer

I have a subform. When there is no data, I can make the
subform.visibale=false, but that leave an ugly blank area on the form. How
can I hide it?

Also on the sub form, I have trouble make it looks right. I have used third
party grid controls in VB6 and .net, but this is my first try on Access. Let
me just describe what I want to achieve, and make sure they are not
impposible.
1) I want filed A to be editable, but not every other fields.
2) I want the cursor to move down a record vertically i.e. from fieldA
record1 to fieldA record2, either by enter key or tab key.
3) Not showing the add new line at the end. ( I tried to set allow addition
to no in subform property, but it did not work.) and
4) at least to resize the column width. (I had them set in sub form design
view, for instance, I had fieldA two times wider than fieldB, but at
run-time, they are evenly show up:(

Thanks a lot!!
 
R

Ron Weiner

Access can do all of that stuff.

In order to remove the "Ugly Blank" area you can rearrange all of the
elements below your subform at runtime and then resize form using
DoCmd.MoveSize() Look in Access help for the proper usage.

1) Set all of the other fields to FieldName.Enabled = False
2) Set all of the other fields to FieldName.TabStop = False
3) Set the Forms AllowAdditions property to False
4) I assume you are displaying the Sub form as a datasheet. When using a
datasheet you control the forms objects with their Column.... properties.
To set the width of a textbox you would use txtMyTextBox.ColumnWidth = 1234.
Where the width is the width in Twips. There are 1440 twips in an inch for
reference.

Good luck with your project.
 
H

homer

Wonderful! I will try them all.

Thanks!

Ron Weiner said:
Access can do all of that stuff.

In order to remove the "Ugly Blank" area you can rearrange all of the
elements below your subform at runtime and then resize form using
DoCmd.MoveSize() Look in Access help for the proper usage.

1) Set all of the other fields to FieldName.Enabled = False
2) Set all of the other fields to FieldName.TabStop = False
3) Set the Forms AllowAdditions property to False
4) I assume you are displaying the Sub form as a datasheet. When using a
datasheet you control the forms objects with their Column.... properties.
To set the width of a textbox you would use txtMyTextBox.ColumnWidth = 1234.
Where the width is the width in Twips. There are 1440 twips in an inch for
reference.

Good luck with your project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top