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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Argh! All I want to do is execute a method in a subform!

Status
Not open for further replies.

tcalbaz

Technical User
Jun 12, 2001
13
0
0
US
Here's my code.

Forms![frm_ToDo]![mySub_ToDo].SetFocus
Forms![frm_ToDo]![mySub_ToDo].cmdFirst

The first line is no problem. At least the correct form is being referenced.

But when it gets to the second line I get the error:

"Object doesn't support this property or method."

Any assistance would be appreciated.

Ted
 
And what is it you want to do? Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
If you are trying to simulate the user clicking the command button cmdFirst, why not just call the OnClick event of cmdFirst? If the code you showed exists in a global module rather than in the form you referenced, then you need to set the cmdFirst_Click procedure to Public. Then call it like this Form_frm_ToDo.cmdFirst_Click.
 
FancyPrairie

DUH !!!

Forms![frm_ToDo]![mySub_ToDo].cmdFirst

should be

Forms![frm_ToDo]![mySub_ToDo].cmdFirst_click

I think it was too much ice cream and soda.

Thanks for the reality check.

Ted
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top