Form's macro won't run

W

winchwench

Hi, all!

I have a form that is used by 4 people for very similar data entry, but they wanted it customised so as not to view field each doesn't need. I did SaveAs and gave each their own form, removing unecessary fields, but...

I have a macro ShowOneTwo that sets visible to No for the 2 subforms on tabs at the bottom half of the form. When user enters One or Two in a field, the macro runs OnLostFocus for that field and shows either tabOne or tabTwo. It worked fine until I tried to separate everyone's forms (I did go in and change the names to corresponfd with each form).
Now the tab itself shows up, but not the form on the tab. I can't find anything that looks any different than the way it was set up originally; the macro referenced the tabname, and when .Visible was reset to Yes, everything showed up. I'm flummoxed!!

If anyone has ideas, I'd LOVE to hear them. You guys usually have great stuff. Btw, I am not a VB programmer, basically just use db objects as they're set up, tho I can understand some SQL & enough VB to change what I see :|
 
S

SteveS

Some thoughts...

Does this also happen on the original form?
Does it act the same on all 4 forms?
Was the subform control deleted?
Is the subform control visible property set to Yes?
If the subform control is still there, have you tried
the 'Move to Front' command?


Instead of entering a 1 or 2 in a field, did you explore
using an option group? You could have three options: None
(option 0), Subform 1 (option 1) or Subform 2 (option 2).


HTH
Steve
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)
-----Original Message-----
Hi, all!

I have a form that is used by 4 people for very similar
data entry, but they wanted it customised so as not to
view field each doesn't need. I did SaveAs and gave each
their own form, removing unecessary fields, but...
I have a macro ShowOneTwo that sets visible to No for the
2 subforms on tabs at the bottom half of the form. When
user enters One or Two in a field, the macro runs
OnLostFocus for that field and shows either tabOne or
tabTwo. It worked fine until I tried to separate
everyone's forms (I did go in and change the names to
corresponfd with each form).
Now the tab itself shows up, but not the form on the tab.
I can't find anything that looks any different than the
way it was set up originally; the macro referenced the
tabname, and when .Visible was reset to Yes, everything
showed up. I'm flummoxed!!
If anyone has ideas, I'd LOVE to hear them. You guys
usually have great stuff. Btw, I am not a VB programmer,
basically just use db objects as they're set up, tho I can
understand some SQL & enough VB to change what I see :|
 

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

Top