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!

Subform not firing event

Status
Not open for further replies.

SQLScholar

Programmer
Aug 21, 2002
2,127
GB
Hey all,

I dont "do" access stuff very often and i am struggling.

I have a form\subform all working fine. However on the subform design i have added this

Private Sub Form_AfterUpdate()
Me.Form.OrderBy = "OrderKey"
Me.Form.OrderByOn = True
End Sub

This works fine when i view the form on its own, however when i call it as a subform it doesnt seem to fire.

Any ideas why?

TIA

Dan

----------------------------------------

Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Bernard Baruch

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
How are ya SQLScholar . . .

I've never seen the [blue]form property[/blue] used that way with [blue]Me[/blue]. Typically its used to reference a subform from from code residing in the subforms parent form ... as in:

Code:
[blue]Forms!MainFormName!subFormName[purple][b].Form[/b][/purple].ControlName[/blue]

You should drop the form property and try:

Code:
[blue]Me.OrderBy = "OrderKey"
Me.OrderByOn = True[/blue]

[blue]Your Thoughts? ...[/blue]

See Ya . . .

Be sure to see FAQ219-2884 Worthy Reading! [thumbsup2]
Also FAQ181-2886 Worthy Reading! [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top