Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

permanently change picture on subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BruceS - 20 Jun 2007 18:01 GMT
Hi, everyone!

I have a subform that I use to demonstrate how a picture will appear as a
form background (centered, tiled, etc.)  On the main form, I have controls
that allow the user to browse & select a new picture, set the starting
position, and tile or not tile.  The code I have works fine in accomplishing
this.  

The problem is that I want to make the user's changes permanent so that the
next time the form is opened their last selection will appear.  I tried the
normal "DoCmd.Save".  It didn't work.  I also tried saving the subform itself
with
DoCmd.Save acForm, [subform name]
but Access kicks an error saying that the form is not open.

How can I get the new subform properties to save?

Thanks,
Bruce
Carl Rapson - 20 Jun 2007 22:52 GMT
> Hi, everyone!
>
[quoted text clipped - 19 lines]
> Thanks,
> Bruce

What I would do is to save the picture file name in a field in the database,
and refer to it in the subform's Open event. When the user selects a new
picture, just change the file name in the database and it should appear the
next time the subform opens.

Carl Rapson
BruceS - 21 Jun 2007 02:17 GMT
Thanks, Carl.  That's what I was doing before, in the Current event.  Just
trying to avoid the slight delay as the picture is loaded.  Guess I'll just
have to put up with it.

Thanks,
Bruce

> > Hi, everyone!
> >
[quoted text clipped - 26 lines]
>
> Carl Rapson
Carl Rapson - 21 Jun 2007 15:56 GMT
Well, there's only so much we can do within the Access framework. :)

Carl Rapson

> Thanks, Carl.  That's what I was doing before, in the Current event.  Just
> trying to avoid the slight delay as the picture is loaded.  Guess I'll
[quoted text clipped - 38 lines]
>>
>> Carl Rapson
Dirk Goldgar - 21 Jun 2007 05:09 GMT
> Hi, everyone!
>
[quoted text clipped - 12 lines]
>
> How can I get the new subform properties to save?

My guess is that your code would have to open the subform in design
view, set its properties all over again, and then save it.  Most changes
you make in form view don't stick.  It would probably be easier to save
the properties somewhere and reload them in the subform's Open event, as
Carl Rapson suggested.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.