Results 1 to 4 of 4
  1. #1
    revned12 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    6

    Checkbox in mainform to control subform


    Hello everyone,

    I have a checkbox:chkISO and set default Value: YES this checkbox is place is in my mainform

    I need that since it set to YES it will filter only a record in my subform:Subform_ProjectList that contains ISOMETRICS under Title field name.

    My subform has many field name like Doc Nos, Rev, Title, Status and etc....

    can anyone help what my code are to accomplish this automation...

    thanks in advance...

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Does the main form have a RecordSource? Are the main and sub forms synchronized with the Master/Child links properties? What is the linking field?

    Want to provide db for analysis? Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    revned12 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    6
    yes my mainform has record source:Q_Project List
    my mainform and subform has no link

    how can i accomplish this automation? it is possible to work in access?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Why do the form and subform not have linking primary key/foreign key fields?

    Is ISOMETRICS the complete value in Title field? Do you want filter to happen when the form is opened or when user clicks on the checkbox or both? The behavior you want will determine what event(s) the code must be executed from, possibly the form Open and checkbox Change events.

    If Me.chkISO = True Then
    Me.subformContainerControlName.Form.FilterOn = False
    Me.subformContainerControlName.Form.Filter = "Title='ISOMETRICS'"
    Me.subformContainerControlName.Form.FilterOn = True
    End If
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 06-15-2012, 05:08 AM
  2. Replies: 4
    Last Post: 03-30-2012, 01:47 AM
  3. Replies: 1
    Last Post: 11-29-2011, 01:37 AM
  4. Link between subform and mainform
    By crowegreg in forum Forms
    Replies: 2
    Last Post: 08-24-2011, 07:05 AM
  5. Replies: 0
    Last Post: 03-14-2009, 12:33 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