I'm not sure why you posted this in the Reports forum. However, you can't save these changes unless you are in the design view of your report or form.
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
I don't think you want to get into design view of your form with code. There are probably a half dozen better solutions. For instance:
Create a small lookup table:
[tt][blue]
tblMyValues
================
ValueName text
TheValue text
[/blue][/tt]
For now, add one record:
[tt][blue]
ValueName TheValue
=========== =============
FormACaption My New Caption
[/blue][/tt]
In the On Open event of FormA, add this code:
Code:
If Not IsNull(DLookup("TheValue","tblMyValues","ValueName='FormACaption'")) Then
Me.Caption = (DLookup("TheValue","tblMyValues","ValueName='FormACaption'")
End If
Now, you maintain values in tables rather than changing code.
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.