That all sounds very straight forward, the only thing i need is how to set a control's columnorder or columnwidth.
One thing though, in your first example you referenced a query and not the form to get the Order and Width, i thought you now say that you reference the form and not the table or query behind it.
Can you attach that database again please.
Change a field attributes in a query eg width
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: Change a field attributes in a query eg width
Last edited by Pat on 11 Aug 2010, 10:05, edited 1 time in total.
-
- Administrator
- Posts: 78574
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Change a field attributes in a query eg width
What is the problem? If the download failed, could you try it again?
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: Change a field attributes in a query eg width
Sorry about that, i missed seeing the database, i now have it and will study it.
Thank you Hans, we seemed to cross posts there.
Thank you Hans, we seemed to cross posts there.
-
- Administrator
- Posts: 78574
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Change a field attributes in a query eg width
The code that I posted in my first reply was intended to set the column width and column order of a column in a query.
A bit further in the thread you mentioned that you wanted the user to be able to move and resize columns in a datasheet form, so the latest example is for a datasheet form.
A bit further in the thread you mentioned that you wanted the user to be able to move and resize columns in a datasheet form, so the latest example is for a datasheet form.
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: Change a field attributes in a query eg width
Yes you are quite right re the form vs query.
Thank you, the variable CodeContextObject is nifty. I understand the example database.
I had never heard of that before, i learn something again from you, many thanks.
Thank you, the variable CodeContextObject is nifty. I understand the example database.
I had never heard of that before, i learn something again from you, many thanks.
-
- Administrator
- Posts: 78574
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Change a field attributes in a query eg width
CodeContextObject is a handy and powerful variable because it lets you write code in a standard module that can be called from any form (or report) without having to pass a reference to the form (or report) or its name.
Best wishes,
Hans
Hans