A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

resizing control on form open



 
 
Thread Tools Display Modes
  #1  
Old August 6th, 2004, 02:47 PM
DP
external usenet poster
 
Posts: n/a
Default resizing control on form open

Could someone tell me how to resize a control like a label or listbox when
the form opens to be the EXACT same height and width of the forms detail
section?

For reasons important to me, but not essential to describe here, I would
like to open this form in hidden view when I start the database, make sure
that the specific control I have in mind is resized to the exact same height
and width of the form's detail section, and then save the form - without the
user ever seeing it.

I don't know why something like this is not working:

Me.ControlX..height = Me.Section(acDetail).height

Controlx is not resized.

I would also like to program the explicit dimensions of this form the first
time it's open. Just for example, so that everything is, say, 1440 twips
width by 2000 twips height.

This would then, I guess, have to apply to ControlX, the forms Detail
section, AND the form itself (?).

Can anyone help?

Thanks!


  #2  
Old August 8th, 2004, 06:11 PM
Peter De Baets
external usenet poster
 
Posts: n/a
Default resizing control on form open

Me.ControlX..height = Me.Section(acDetail).height

Try this:

Me!ControlX.height = Me.Section(acDetail).height


Also, if you want to save the changes to the form, you'll have to open
the form in design mode, make the changes, then save it. This can be
done programatically.

I'll bet there's an easier way to do whatever it is you are trying to
do.

Hope this helps,

Peter De Baets
Peter's Software - MS Access Tools for Developers
http://www.peterssoftware.com
  #3  
Old August 8th, 2004, 07:35 PM
DP
external usenet poster
 
Posts: n/a
Default resizing control on form open

Peter, there may be an easier way, but your were the perfect person to
answer because the problems I encounter are related to having resizing code
on this (and other forms). I use a "combination" of the resizing code from
the Access Developers Handbook and your resizing code. By "combination" I
don't mean that I use them together (!). We corresponded about this issue
once before. I use the Developer Handbook resizing code. But - as I told you
once in our correspondence - on occasions, and for reasons I don't
understand, the forms got saved in the LARGE (rezized UP) version. It had to
do somehow with my working with the form's module, which opened the form in
designed view, and somehow it got saved in that large version.

This wrought havoc when the same form was opened on a computer with a
smaller resolution.

I use your code to open the offending forms in design view and resave them
back to smaller sizes.

Sounds convoluted, and it probably is, but I haven't hit on a better
solution.

The problem with the one form I'm inquiring about is caused when an imaging
software control, which just looks like a rectangle on the form, acquires a
different size than the form's section.

They need to be identical, or the form + plus image doesn't display
properly.

This never happens on my working computer. But if I transfer the identical
database file to, say, my laptop, with it's lesser screen resolution, that
form starts to cause problems UNTIL I physically open it up in form detail,
resize the image control to the exact height and width of the Detail
section, and save it.

Then things are fine.

But this is not an issue I can pass along to "end users."

My idea was that if,whenever the database is first started, this offending
form opens in hidden view, in design mode, the image control is made equal
in height and width to the Detail section, then saved and closed, the
problem would be fixed from then on on that particular computer.

I'll try what you suggested, but I think I tried this - it's fairly
obvious - a long time ago, and the form won't save with ControlX having been
made equal in height and width to the Section.

David Pike


"Peter De Baets" wrote in message
om...
Me.ControlX..height = Me.Section(acDetail).height


Try this:

Me!ControlX.height = Me.Section(acDetail).height


Also, if you want to save the changes to the form, you'll have to open
the form in design mode, make the changes, then save it. This can be
done programatically.

I'll bet there's an easier way to do whatever it is you are trying to
do.

Hope this helps,

Peter De Baets
Peter's Software - MS Access Tools for Developers
http://www.peterssoftware.com



  #4  
Old August 8th, 2004, 08:20 PM
DP
external usenet poster
 
Posts: n/a
Default resizing control on form open

Peter, I'm making progress (on something so simple), but there is no
property for Me.Section(acDetail).Width, is there!?





"Peter De Baets" wrote in message
om...
Me.ControlX..height = Me.Section(acDetail).height


Try this:

Me!ControlX.height = Me.Section(acDetail).height


Also, if you want to save the changes to the form, you'll have to open
the form in design mode, make the changes, then save it. This can be
done programatically.

I'll bet there's an easier way to do whatever it is you are trying to
do.

Hope this helps,

Peter De Baets
Peter's Software - MS Access Tools for Developers
http://www.peterssoftware.com



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display Parameter from Form on Report sara Setting Up & Running Reports 10 July 19th, 2004 04:54 PM
Form in Edit Mode JN Using Forms 0 July 12th, 2004 05:47 PM
How to assign value to a report control? Peter General Discussion 3 June 29th, 2004 11:17 AM
Restricting entries in a ComboBox tina General Discussion 5 June 14th, 2004 05:13 PM
Using data on form A to control form B's results arketekchic New Users 2 May 13th, 2004 02:31 PM


All times are GMT +1. The time now is 07:00 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.