473,326 Members | 2,095 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

How to close and open a column in a sub form

Dear reader,

You can close a column (makes a column invisible) in a sub form with the
following VBA code:

SubFormName.Form!FieldName.ColumnWidth = 0

If column is closed and it is necessary to open the column again you expect
the following VBA code will do that:

SubFormName.Form!FieldName.ColumnWidth = 10

But this code gives not an error message and neither has it opened the
column.
Is there a code available which open the column in a sub form after it is
closed by the first code line?

Thanks for any help.

Regards,

Simon
Oct 1 '08 #1
1 1359
Simon van Beek wrote:
Dear reader,

You can close a column (makes a column invisible) in a sub form with the
following VBA code:

SubFormName.Form!FieldName.ColumnWidth = 0

If column is closed and it is necessary to open the column again you expect
the following VBA code will do that:

SubFormName.Form!FieldName.ColumnWidth = 10

But this code gives not an error message and neither has it opened the
column.
Is there a code available which open the column in a sub form after it is
closed by the first code line?

Thanks for any help.

Regards,

Simon
This might get you started. I dropped a datasheet into a form. MF =
Mainform. SF = Subform.

Private Sub HideCol_Click()
Forms!MF!SF!FldName.ColumnHidden = -1
End Sub
Private Sub UnHideCol_Click()
Forms!MF!SF!FldName.ColumnHidden = 0
End Sub

Oct 1 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Andras Gilicz | last post by:
Hi VB fans I'm working on a relatively large project in VB6 with about a dozen forms, including graphs, labels, text boxes, etc. The software itself is actually a flow simulator with more or...
3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
1
by: Alpha | last post by:
I have a Window based application that shows up still running in the task manager when I close it. It reaches the "this.close" statement and then it stops at the "}" at the section of the...
4
by: Lerp | last post by:
Hi, I have this sub in which I am trying to get a client name from a second table based on a clientid value in my datalist. I am having problems grabbing the clientid value out of my datalist...
14
by: Paul | last post by:
Hi I have 2 functions in java script, one opens a second window-this works, the other is supposed to close this second window, does not seem to be working. Just wondering if anyone had any ideas....
7
by: Alice | last post by:
Hi, In my program, the user can navigate to many different forms. When they go to the next form, I want the form they have left to close. However, the forms aren't closing. Can anyone tell me...
5
by: AP | last post by:
IS there a way to run a procedure if the users close access directly rather than closing a menu screen that I have built? There is an event that works on close for this form, but it doesnt seem to...
3
by: Joris De Groote | last post by:
Hi, I use Adobe Acrobat to read tekst from PDF files. After that the file has been read, I move the file in a folder (using the date I got from the text I got from Acrobat). Now here is my...
20
by: raddrummer | last post by:
Hi there, I'm woking on a function that takes the input from a form (including Payroll Contact), uses it as a query parameter, runs the query, and then emaills out a custom .xls file using the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.