Results 1 to 2 of 2

Thread: Change to a subform

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Change to a subform

    I want this code to be written for a subform and I don't know how to rewrite it... I've tried Me.form1.form.filter = but that doesn't work. The forms name is form1 and I have no idea how to get the filter to work on it. Thanks!

    VB Code:
    1. Private Sub Form_Load()
    2. If lngMyEmpID = 0 Then
    3. DoCmd.ApplyFilter , "Squadron IN('MXS','AMXS','MOF')"
    4.  
    5. ElseIf lngMyEmpID = 1 Then
    6. DoCmd.ApplyFilter , Squadron = "RQW_HQ"
    7.  
    8. ElseIf lngMyEmpID = 2 Then
    9. DoCmd.ApplyFilter , "Squadron IN('101','102','103','OG_HQ','OSF')"
    10.  
    11. ElseIf lngMyEmpID = 3 Then
    12. DoCmd.ApplyFilter , "Squadron IN('MSG_HQ','MSF','SFS','SVF','LRS','CES','CF','MDG')"
    13. End If
    14. End Sub

  2. #2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width