Persisting SizeMode Property thru VBA

Premy

Registered User.
Local time
Today, 10:39
Joined
Apr 10, 2007
Messages
196
Hi there,

I have a form with an imageframe and 2 buttons which allow the user to either Clip (Me.Im1.SizeMode = acOLESizeClip) or Stretch (Me.Im1.SizeMode = acOLESizeStretch) the image. In design view SizeMode is set to Clip.
My prob is that when the user clicks Stretch, the image stretches alright but the form's SizeMode property remains unchanged; so when he closes then opens the form again, it's back in Clip mode.

I can of course save the clicked value in a field to retrieve it at runtime, but I can't believe Access has no built in support for that. Or is this rather a bug on my machine?

Appreciate,
Premy
 
You can create a table for "preferences" and then when the form loads you can set the preference that is stored there and when the form is closed you can save the preferences to the table so the user's preferences can be accessed next time and set accordingly. We are using such a method for the project I am currently working on.
 
So Access definitely does not allow one to set the SizeMode prop thru VBA?
I wonder then why some props can be set and others not.

Thanks anyway, if that's the way to go, then that's the way we'll go!

Regards,
Premy
 
I'm sorry, I thought you were saying that you could set the property via VBA but that it reverted (which it would) when closing and then reopening. I don't know for sure if you can set that property via VBA but my suggestion was based on the assumption that you could. Sorry for misunderstanding.
 

Users who are viewing this thread

Back
Top Bottom