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!

Tab Control and Filtering??

Status
Not open for further replies.
Mar 15, 2002
82
US
Hi,
I have a form with a Tab control on it that, so far, has 2 Tabs. One tab is called Add and it allows people to add information to a table. The other tab is called Edit, which of course allows them to edit, but I also want the user to be able to delete a record there. The Edit Tab has a combobox on it where the user will select a name and a subform where I want the record associated with the name to show. From there, the user can edit or delete the information. My problem is when I select a location from the combobox, the record in the subform never changes. The code activates, but I can't seem to get the filter to work. Below is the code that I have where the filter doesn't work.

Private Sub cmbAlarmLoc_AfterUpdate()

Me!txtAcct = cmbAlarmLoc.Column(1)
DoCmd.ApplyFilter , "AccountNumber = Forms!AlarmAccts!txtAcct"
Me!AlarmAcctSubform.Visible = True
Me!cmdDeleteAcct.Visible = True

End Sub

I hope I explained it clearly enough. Any help or suggestions would be appreciated.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top