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

Combo Box and Subform

Status
Not open for further replies.

MarkNie

Technical User
Sep 22, 2005
102
GB
Hi

Any help in the below will be greatly appreciated.

I have a main form and need to split the data into months. I have created a table for each month and a query for each which calls the records I require.

I am using a main form which I then inserted a tab control for each month. I then inserted a subform in the tab control for the specific month.

The problem I am having is when the form is not a subform the combo box selection and afterupdate event works fine. As soon as I stick it in a subform that is when I get an error. I think it must have something to do with the VBA AfterUpdate. I have had a look in other threads but can't find anything that is similar to my issue.

The error is:

Run-time error '2491'
The action or method is invalid because the form or report isn't bound to table or query.

Event Procedure:

Private Sub SelectAccount_AfterUpdate()

DoCmd.ApplyFilter , "Tracking_ID = form!frmTracking_Hub_Jan!SelectAccount"


Exit_SelectAccount_AfterUpdate:
Exit Sub


End Sub

Any help in this will be great.
Thanks in advance.

Regards
Mark
 
how are ya MarkNie . . .

Its your form/subform [blue]referencing[/blue] that has changed.

Have a look here: Refer to Form and Subform properties and controls

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top