Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197

    Then change the filter using the forms filter property or do a requery on the sub form, regarding wether you used the .Filter or some filter in the record source.

  2. #17
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    I’ve tried all of what you suggested. It only clears the first field in the first column. The filter property of the subform is already set to filter to cust_id=null and filter on load set to yes. When I open the form; the subform doesn’t have records like I want but when a search is performed and after reset; all controls on the form clear but not the subform. Is there a way to reload the form as if opening when the database is closed since this seems to work?

    Code:
    Private Sub btnClear_Click()
      Dim ctl As Control
       Dim txtBx As TextBox
       For Each ctl In Me.Controls
          If ctl.ControlType = acTextBox Then
             Set txtBx = ctl
             If txtBx.Tag = "clr" Then
                txtBx.Value = Null
          End If
          End If
       Next ctl
    ' [Forms]![frmCustSrch]![sfrmCustSrch].[Form]![Cust_id] = Null
    'Me.sfrmCustSrch.Requery
     [sfrmCustSrch].[Form]![cust_id] = Null
    End Sub

  3. #18
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    what is the value of the filteron property? It should be set to true.

  4. #19
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727
    Sorry for the delay. Iv'e done everthing suggested but still doesn't seem to work. when I put "[sfrmCustSrch].[Form]![cust_id] = Null", it only cleared the first field in the first record.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 05-20-2014, 09:32 AM
  2. blocking blank spaces on a subform
    By Paintballlovr in forum Forms
    Replies: 5
    Last Post: 12-06-2013, 05:22 PM
  3. Replies: 6
    Last Post: 08-24-2012, 12:04 PM
  4. Replies: 5
    Last Post: 06-11-2012, 08:47 AM
  5. Replies: 4
    Last Post: 03-14-2012, 10:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums