Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form property changes

Status
Not open for further replies.

VeeFour

Technical User
Nov 24, 2002
29
0
0
GB
I am trying to set a new background for a form using code:

Forms![frmsite].Picture = "C:\example.jpg"

My first problem is when I exit the database and reload it, it reverts back to the original default, how can I make the change permanent?

Secondly, the code only works when a form is open, how can make the change without the form being open?

Kind Regards
 
You may tru this:
DoCmd.OpenForm "frmsite", acDesign, , , , acHidden
Forms![frmsite].Picture = "C:\example.jpg"
DoCmd.Close acForm, "frmsite", acSaveYes

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
VeeFour . . .

Put your code in the forms [blue]On Open[/blue] event! . . .

Calvin.gif
See Ya! . . . . . .
 
Thanks alot fellas, your help is greatly appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top