control on subform on tab

alaric

Registered User.
Local time
Today, 15:38
Joined
Sep 6, 2004
Messages
50
Hi
I've following crazy problem:
I have a form wich contains a tabcontrol with 2 tabs
on each tab I have 4 subforms
(giving dancecouples points for their performance)

When entering the form I ask how many subforms are needed.
Then, on the subform the user needs to fill 2 comboboxes. So far so good.

When I want to leave the form or change the amount of pairs. I need to UNDO the second combo (name: cboLevel), otherwise I get an error (because the point fields are required).

an undo button on the spec subform works fine and also the undo from the menu. pressing ESC does also the job.

but when i try this with a button on the main form.... aaaah I cant get it done
I tried:
- DoCmd.RunCommand acCmdUndo
- DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
- SendKeys "{ESC}", True
- Me!TabCtl1!SFafdansen1.Undo

Conclusion... Im not able to reference a control on a subform on a tab

I'm out of inspiration...

please help
many thanks in advance
Alaric
 
Last edited:
I've run into a similar issue before. I think the problem is the undo command from the main form, not the referencing. As soon as your subform loses focus, all changes are automatically saved, and you can no longer undo them. So when you fill in your combo boxes in the subforms and then go back to the main form, you lose the ability to undo the subform.

I never really found a nice way to get around this. Anyone else have any ideas?
 
possible solution???

Thx for your explanation
This makes sense and make me not doubting myself.

a possible solution might be:
click undo on the Mainform wich "clicks" all the (invisible) undo buttons on the subform

if this is possible??

Alaric
 

Users who are viewing this thread

Back
Top Bottom