Set form property permanently

  • Thread starter Thread starter Tony Vrolyk
  • Start date Start date
T

Tony Vrolyk

I am using some code to set the form picture property on open. Is there a
way in code to have a form property set permanently so I don't have to do it
on open all the time? The catch is I can't do it in design mode.

Thanks
Tony Vrolyk
 
Will that work in Access runtime?


Graham R Seach said:
Tony,

No! You can only do it in design view, but you can open design view using
VBA:

Public Sub SetProp()
DoCmd.OpenForm "Form1", acDesign
Forms!Form1.Text0.BackColor = vbRed
DoCmd.Close acForm, "Form1", acSaveYes
End Sub

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html


do
 
Back
Top