By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,039 Members | 1,824 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,039 IT Pros & Developers. It's quick & easy.

ColumnHidden question

P: 5
Hi,

I'm trying to hide columns on a subform that is unbound. I assign a query to the subform at runtime and I am wanting to hide a column from the user. I accomplish this with the columnhidden property but everytime I close the form in Runtime, MS Access is asking me if I want to save the query. I am just wanting to hide the column from the view and not directly accessing the query.

Here's the code:

Me.tblMasterSchedule_subform.Form![RecordNum].ColumnHidden = True

Any suggestions would be welcomed.

Thanks,

Tony
May 14 '07 #1
Share this Question
Share on Google+
6 Replies


JConsulting
Expert 100+
P: 603
Hi,

I'm trying to hide columns on a subform that is unbound. I assign a query to the subform at runtime and I am wanting to hide a column from the user. I accomplish this with the columnhidden property but everytime I close the form in Runtime, MS Access is asking me if I want to save the query. I am just wanting to hide the column from the view and not directly accessing the query.

Here's the code:

Me.tblMasterSchedule_subform.Form![RecordNum].ColumnHidden = True

Any suggestions would be welcomed.

Thanks,

Tony
interesting about the prompt to save the query. Maybe something else is going on? However you can set the column width to 0 to hide a column.
J
May 15 '07 #2

P: 5
interesting about the prompt to save the query. Maybe something else is going on? However you can set the column width to 0 to hide a column.
J
I've tried to use the columnwidth option as well. It prompts me to save even if I manually resize the column width after I close the form when I'm in Run mode.
May 16 '07 #3

JConsulting
Expert 100+
P: 603
I've tried to use the columnwidth option as well. It prompts me to save even if I manually resize the column width after I close the form when I'm in Run mode.
how about setting the column width manually when the form is open in form view. Save and close. Your column stays hidden. When you close now..no prompt..right?
May 16 '07 #4

P: 5
Thanks, that worked! But I am still having a problem with the user having the ability to manually change column widths and then when they close the form it prompting them to save the query. The problem with that is when you save the query, it removes the actualy Select statement and the query is blank. How do I keep the user from manually changing the column widths? Is there a way?
May 17 '07 #5

JConsulting
Expert 100+
P: 603
Thanks, that worked! But I am still having a problem with the user having the ability to manually change column widths and then when they close the form it prompting them to save the query. The problem with that is when you save the query, it removes the actualy Select statement and the query is blank. How do I keep the user from manually changing the column widths? Is there a way?
you could change your form to a continuous form. arranging your fields next to one another tightly will give the same appearance of a datasheet...but the ability to change widths will be taken away.
May 18 '07 #6

dima69
Expert 100+
P: 181
This behavior is rather odd. It should not happen if you do the things right. Maybe you can put here all the code involved so we can see the whole picture.
May 18 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.