Re: change form property using SetValue
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Thu, 8 Dec 2005 09:02:35 +0800
Okay, we are going to build this reference a step at a time.
1. Make sure this form is open.
2. Press Ctrl+G to open the Immediate window.
3. Enter:
? Forms![YourMainForm].Name
substituting the name of your main form in brackets.
When you press Enter, Access should show the name.
4. Once you have that working you can try to get the reference to the
subform. On a fresh line in the Immediate window, try:
? Forms![YourMainForm]![SubHistory].Form.Name
If that responds with SubHistory, the reference is correct.
If not, then the subform control is named something different.
5. Once that is working, try:
? Forms![YourMainForm]![SubHistory].Form.AllowEdits
Access should respond with either True or False.
6. Once that is working, you can copy the expression (without the question
mark), and paste it into your macro below the SetValue action.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Mindy" <master2005_sas@xxxxxxxxx> wrote in message
news:1133994884.286349.314600@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Sorry, I didn't explain it clearly. The forms!formname!controlname of
> setvalue is for setting up value of a control. What I want here is
> different.
>
> when we chose a form property, we will see form/data/event/other/all,
> and under "data" there is Record Source, Filter, ..., Allow Edit, ...,
> what I want is after a user hit one button, the "Allow Edit" property
> will be changed from "NO" to "YES."
>
> Thanks.
>
> Mindy
.
- Follow-Ups:
- Re: change form property using SetValue
- From: Mindy
- Re: change form property using SetValue
- References:
- change form property using SetValue
- From: Mindy
- Re: change form property using SetValue
- From: Allen Browne
- Re: change form property using SetValue
- From: Mindy
- Re: change form property using SetValue
- From: Allen Browne
- Re: change form property using SetValue
- From: Mindy
- change form property using SetValue
- Prev by Date: Re: Explanation???
- Next by Date: Re: Select INTO ListBox
- Previous by thread: Re: change form property using SetValue
- Next by thread: Re: change form property using SetValue
- Index(es):
Loading