Results 1 to 10 of 10
  1. #1
    vickster3659 is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Mar 2014
    Posts
    47

    Filter checkbox upon opening form

    Hello,


    I need a bit of assistance with a form that has a checkbox called ReleasedAtBank. I would like this form to open with only the records that are not checked in this field. I have tried a few suggestions from this forum but am not getting the desired results.

    Thank you, assistance is greatly appreciated!
    Vickster3659

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Where ever you call this form to open, you need it to start with the FALSE recs.

    docmd.openform "frmMain",,"[ReleasedAtBank]=false"

    If you want to see ALL recs after it opens, just turn off the filter (the funnel icon)

  3. #3
    vickster3659 is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Mar 2014
    Posts
    47
    Thank you!
    It didn't work at first, but while messing around with your line of code, it works with this:

    docmd.openform "frmMain",,,"[ReleasedAtBank]=false"


    Another question.....I designed this form to open in datasheet view, but now with this code it is a form with a background, then you have to click through the records. Is there a way to display the form in datasheet view to see all of the filtered records?

    Thanks,
    Vickster3659

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    oops , sorry..i missed a comma.

    Datasheet?....Then you really dont need the form. Use a query that filters on your criteria.

    Datasheet forms are really for subform lists.

  5. #5
    vickster3659 is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Mar 2014
    Posts
    47
    No worries
    THe reason I want to use a form is I have an audit process in place that works off of the Before Update, After Update, etc., which can't be done using queries according to the individual who wrote the code. Is there another audit process that can be done using queries?

  6. #6
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Not sure what the audit process it, but
    Query = datasheet Form
    they are the same thing.

  7. #7
    vickster3659 is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Mar 2014
    Posts
    47
    The audit process is to keep track of changes to the records. In my process, a person will open the ReleasedAtBank form and see filtered (false) records. Once these records are "accepted", this person will put a check in the ReleasedAtBank. When this is done, the audit process will record the changes to an audit table.

    No worries.....when clicking on the View button in the toolbar, there is the datasheet option. I was just hoping that the form would open always to that view. It's just another click.....

    Thanks for your help today!

  8. #8
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Quote Originally Posted by ranman256 View Post
    Query = datasheet Form
    they are the same thing.
    Not true. A Query is displayed in a datasheet format, but it is not a Form, and does not have Form events such as Before Update, After Update, etc., which the OP is using!

    When opening a Form in Datasheet View, using DoCmd.OpenForm, you have to do so explicitly, using the acFormView parameter:

    DoCmd.OpenForm "frmMain", acFormDS , , "[ReleasedAtBank]=false"

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  9. #9
    vickster3659 is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Mar 2014
    Posts
    47
    Excellent! Thank you Linq, this is exactly what I needed. Trying to make this process easy for the Access User Newbies!

    Appreciate everyone's help.....I am a VBA rookie....I learn so much every time I visit the forum!

  10. #10
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    Glad we could help!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Checkbox Filter?
    By 82280zx in forum Forms
    Replies: 7
    Last Post: 03-14-2014, 10:35 AM
  2. button to table checkbox filter on form
    By Ruegen in forum Forms
    Replies: 3
    Last Post: 10-08-2013, 05:42 PM
  3. Replies: 7
    Last Post: 12-12-2012, 03:14 PM
  4. Replies: 1
    Last Post: 08-01-2012, 03:56 PM
  5. Checkbox filter on a form
    By aletrindade in forum Access
    Replies: 1
    Last Post: 12-02-2009, 06:22 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