Assigning value from subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a tab control on a form. On one of the pages I have a check box.
There is also a sub form on the page giving me a value for the check box.
The user has the option of accepting the value from the sub form or not. I
have a button to accept the sub form value.

I used this code on a different page of the tab control which worked before
.. I have moved it to a new page and now it will not work. I have triple
checked the check box name and the sub form name. I have deleated the sub
form and re-inserted it. Nothing works. I have run out of things to check.

Here is the code...

Me.chk_Balboa.Value = Me.frm_A_sub_AppLocations![chk_Balboa]

Thanks
 
Karen,

Did you copy the code to use a second time or did you move your original
code to a new location on the tab control? The reason I ask is because
sometimes when you cut and paste a button on a tab control, like the one your
user's are clicking to accept the subform's value, the click event becomes
"unattached" from the event procedure -- the properties window for the button
no longer shows there is an event procedure attached to it. I may be
completely off base here and this may not be the issue, but if you moved the
button, this could be the problem. Check the properties dialog box for the
button. Once you "attach" it again, all may be well with the world.

However, if you are re-using the code someplace else, then you might want to
decompile and then compile your code. I have had that problem happen before
when you know something should work and it doesn't. Try adding a breakpoint
on that line and if it doesn't stop, then you'll know it is not running the
code at all. To decompile, go to Run and enter: <path to access> /decompile
<path to mdb file>

Hope this helps!
Diana Criscione
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top