By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,500 Members | 830 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,500 IT Pros & Developers. It's quick & easy.

Filter and Visible Properties

P: n/a
Thanks and Hello to you!

I have a form in A2k that has a tab control on it. The form opens the first
page and filters the records I want just fine. When I click a tab, to view
another set of records (different filter), the filter does not work. At the
same time, I am trying to set certain fields as visible or invisible
depending on the tab, and having problems with that as well.

It seems that after initially setting the filter, the DoCmd.Applyfilter does
not update the form's property sheet.

Here is my code:
____________________

DoCmd.ApplyFilter , "Type='A'"
Me.Requery

Me!FrameCktID.Visible = False
Me!Label72.Visible = False

Me!LecCktID.Visible = True
Me!Label74.Visible = True

Me!AccessCkt.Visible = True
Me!Label75.Visible = True

Me!LocalCktIDIsdn.Visible = True
Me!Label73.Visible = True

Me!Tel1Spid1.Visible = True
Me!Label78.Visible = True

Me!Tel2Spid2.Visible = False
Me!Label79.Visible = False

Me!DialCode.Visible = True
Me!Label80.Visible = True

Me!SwitchType.Visible = True
Me!Label102.Visible = True

Me!Port.Visible = True
Me!Label84.Visible = True

Me!Cir.Visible = False
Me!Label85.Visible = False

Me!DLCI.Visible = False
Me!Label76.Visible = False

Me!VPIVCI.Visible = False
Me!Label77.Visible = False

Me!CktProvider.Visible = False
Me!Label94.Visible = False

Me!LocalConnection.Visible = True
Me!Label83.Visible = True
End Sub

Private Sub Form_Open(Cancel As Integer)

DoCmd.ApplyFilter , "Type='A'"
Me.Requery

Me!FrameCktID.Visible = False
Me!Label72.Visible = False

Me!LecCktID.Visible = True
Me!Label74.Visible = True

Me!AccessCkt.Visible = True
Me!Label75.Visible = True

Me!LocalCktIDIsdn.Visible = True
Me!Label73.Visible = True

Me!Tel1Spid1.Visible = True
Me!Label78.Visible = True

Me!Tel2Spid2.Visible = False
Me!Label79.Visible = False

Me!DialCode.Visible = True
Me!Label80.Visible = True

Me!SwitchType.Visible = True
Me!Label102.Visible = True

Me!Port.Visible = True
Me!Label84.Visible = True

Me!Cir.Visible = False
Me!Label85.Visible = False

Me!DLCI.Visible = False
Me!Label76.Visible = False

Me!VPIVCI.Visible = False
Me!Label77.Visible = False

Me!CktProvider.Visible = False
Me!Label94.Visible = False

Me!LocalConnection.Visible = True
Me!Label83.Visible = True

End Sub

Private Sub ISDN_Click()

DoCmd.ApplyFilter , "Type='I'"
Me.Requery

Me!FrameCktID.Visible = False
Me!Label72.Visible = False

Me!LecCktID.Visible = True
Me!Label74.Visible = True

Me!AccessCkt.Visible = True
Me!Label75.Visible = True

Me!LocalCktIDIsdn.Visible = True
Me!Label73.Visible = True

Me!Tel1Spid1.Visible = True
Me!Label78.Visible = True

Me!Tel2Spid2.Visible = True
Me!Label79.Visible = True

Me!DialCode.Visible = True
Me!Label80.Visible = True

Me!SwitchType.Visible = True
Me!Label102.Visible = True

Me!Port.Visible = True
Me!Label84.Visible = True

Me!Cir.Visible = False
Me!Label85.Visible = False

Me!DLCI.Visible = False
Me!Label76.Visible = False

Me!VPIVCI.Visible = False
Me!Label77.Visible = False

Me!CktProvider.Visible = False
Me!Label94.Visible = False

Me!LocalConnection.Visible = True
Me!Label83.Visible = True
End Sub

Private Sub Leased__PL__Click()

DoCmd.ApplyFilter , "Type='L'"
Me.Requery

Me!FrameCktID.Visible = False
Me!Label72.Visible = False

Me!LecCktID.Visible = True
Me!Label74.Visible = True

Me!AccessCkt.Visible = True
Me!Label75.Visible = True

Me!LocalCktIDIsdn.Visible = True
Me!Label73.Visible = True

Me!Tel1Spid1.Visible = True
Me!Label78.Visible = True

Me!Tel2Spid2.Visible = False
Me!Label79.Visible = False

Me!DialCode.Visible = False
Me!Label80.Visible = False

Me!SwitchType.Visible = False
Me!Label102.Visible = False

Me!Port.Visible = True
Me!Label84.Visible = True

Me!Cir.Visible = False
Me!Label85.Visible = False

Me!DLCI.Visible = False
Me!Label76.Visible = False

Me!VPIVCI.Visible = False
Me!Label77.Visible = False

Me!CktProvider.Visible = False
Me!Label94.Visible = False

Me!LocalConnection.Visible = True
Me!Label83.Visible = True

End Sub

Private Sub Switched_Click()

DoCmd.ApplyFilter , "Type='S'"
Me.Requery

Me!FrameCktID.Visible = True
Me!Label72.Visible = True

Me!LecCktID.Visible = True
Me!Label74.Visible = True

Me!AccessCkt.Visible = True
Me!Label75.Visible = True

Me!LocalCktIDIsdn.Visible = True
Me!Label73.Visible = True

Me!Tel1Spid1.Visible = False
Me!Label78.Visible = False

Me!Tel2Spid2.Visible = False
Me!Label79.Visible = False

Me!DialCode.Visible = False
Me!Label80.Visible = False

Me!SwitchType.Visible = False
Me!Label102.Visible = False

Me!Port.Visible = True
Me!Label84.Visible = True

Me!Cir.Visible = True
Me!Label85.Visible = True

Me!DLCI.Visible = True
Me!Label76.Visible = True

Me!VPIVCI.Visible = True
Me!Label77.Visible = True

Me!CktProvider.Visible = False
Me!Label94.Visible = False

Me!LocalConnection.Visible = True
Me!Label83.Visible = True

End Sub

--
Regards,

Eric J Owens
AT&T Business Services/MasterCard LCM Team
ej*********************@att.com
Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.