473,698 Members | 2,339 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to detect if column widths have been changed in Access datasheet

Hi. I have an Access database with a form containing 4 datasheets and I
allow the user to change column widths. On closing the form, a routine
is fired that saves each column width to an INI file.

When the form is opened, the INI file is read and sets up the column
widths for the user.

Works well, but there is a slight delay on closing the form, so I would
like to detect if any column widths have been changed and save them
only if they have been changed. There is no
OnDatasheetColu mnWidthChange event that I know of. Anybody got any
ideas?

My only idea so far is to add up the total of all column widths on
opening the form, store this number and compare it to the total of all
column widths before closing the form - if there is a difference then I
would save the column widths.

Dec 21 '06 #1
2 2179
Are you trying to save the column width's for each user? Or just save the
column widths as they were last saved by any user? The reason I ask is, when
I change widths on a datasheet form, the changes are automatically saved and
return when the form is opened again.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200612/1

Dec 21 '06 #2
Missing....

Since he is saving it in an INI file it is probably for each user. I do
the same but I use a table keyed by user and form name and a record for
each field involved.

As to the question, I can't think of any easier way. Chances of them
changing sizes on two columns and offset each other are extremely
slim.

Ron

Dec 21 '06 #3

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

Similar topics

3
13416
by: A Clark | last post by:
I have a subform that displays a datasheet. There are a couple of different queries that can be displayed in the datasheet. The queries are available in a combo box on the main form. The problem I am having is that when I change the query all the column widths remain the same. This doesn't look very good. I can't figure out a way to set the column widths. I have tried.. Subform.controls(Name of Column).columnwidth = IntColumnWidth
2
6156
by: Todd | last post by:
Hello, I'm curious if anyone knows of a way (if one exists) to tell a form (in Access 2002 VBA) to sort on an unbound column of a combo box on the form. Here's what I want to do: A combo box on my form contains a category ID (bound column, not visible, long integer) for the items listed on the form and a description (unbound column, visible, string.) I can "Sort Ascending" and "Sort Descending" on the visible description in the...
1
3772
by: Fred Ferreira | last post by:
Hi there Does anybody know how I can lock the column widths at Datasheet form view?
3
8050
by: dhowell | last post by:
Can I have a datasheet form automatically "fit" the column widths when the form opens?
1
2341
by: scott8000 | last post by:
hi all Access 2K/2003, Win XP Pro I need to be able to detect when a subform datasheet is currently displaying a vertical scrollbar. I.e if the subform datasheet is showing more records than can fit the subform window Access will make the vertical scrollbar visible.
5
7350
by: deekay | last post by:
I want to allow users to resize and reposition columns of a datasheet but for a prompt to be brought up and only the layout only to be saved if they select "save changes". This is the way it works at the moment for queries but for datasheet forms I find that it automatically saves column positions and widths without prompting to save changes. I should mention i am using Access 2000
1
2965
by: tom taol | last post by:
Currently, there are 3 datasheets in a form. and, i changed column widths of each form(datasheet type) by the way, there is not keep the column width in ms access. for example, i close the form, open the form again... the width of the form is not keep.... I want to apply column widths of a form lately. *** Sent via Developersdex http://www.developersdex.com ***
1
4162
by: ncsthbell | last post by:
Here is the scenario. I have a form-"formA", I created another form-"FormB" which will be placed on FormA . I go to FormA in desgn view and use the button for "create subform" to bring in "FormB" onto "FormA". Here is the problem.... once the subform is on the main form you can not change any of the characteristics on "FormB" and have them show on "FormA". For example, I change the order of columns or column widths in "FormB" and save it. ...
5
11028
by: Deano | last post by:
I have five subforms each living in a page on a tab control. Each form is in datasheet view. The time has come to resize both the forms and the subforms. I am able to change the column widths in the first subform and these are remembered. However the column widths for all the other subforms change back to their original widths when I re-enter the form. I have no idea why this is and I have checked that all the form properties are...
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8895
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7725
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2329
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.