Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Edit button on Subform to control Sub & Main form controls

Status
Not open for further replies.

CJTyo

Programmer
Joined
Sep 17, 2002
Messages
181
Location
US
I would like to create a form that holds nothing but Save, Delete, Undo, and Edit buttons - which I can embed in my data lookup forms to control those actions (instead of having to copy a new set to each data lookup form).

I can get the buttons to work perfectly when they're directly on the main forms, but can't get them to function properly when they're on a subform.

Specifically, the Edit and Undo buttons require passing the Form name to the code, and putting =Edit([Form]) is only sending the Subform name and thereby letting the code work only on the Subform, which I don't want.

So my question is: how do I pass the Main form name - if this type of control is even possible from a subform?

As a bonus question: IF I can get this to work, is there a way to have the buttons control the actions on other Subforms linked to the Main form? Even when I have the buttons directly on the Main form they do not control the other Subforms.

I've been doing all kinds of searchs throughout TekTips, plus reading through my Access 2000 VBA Handbook AND the Developers Handbook, and have either reached my input limit so my brain has shut down or I haven't found what I'm looking for to make this work. Help!

Thank you!

C *~*~*~*~*~*~*~*~*~*~*~*~*
Insanity is a matter of Perception. [yinyang]
 
I found something about global variables and subforms in thread 702-461372 - and after messing around a bit got it to work for me.

I do still have the question about how to make the edit toggle control the other subforms as well as the main.

Thanks!

C *~*~*~*~*~*~*~*~*~*~*~*~*
Insanity is a matter of Perception. [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top