Results 1 to 4 of 4
  1. #1
    bbarclay is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    17

    passing is not null from Form Button to report for a field

    This would operate from the button, not from the report. it would look something like this.

    Private Sub Command52_Click()
    DoCmd.OpenReport "allotteeQueryPercentages1", acPreview, , "[allotteeTracker.permissionToSurveySent] = " & "IsNotNull"
    End Sub

    but I can't get that to work.

    Any suggestions are greatful.


    Thank you




    Brandon

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No "=" and more spaces. Try

    DoCmd.OpenReport "allotteeQueryPercentages1", acPreview, , "[allotteeTracker].[permissionToSurveySent] Is Not Null"

    Note I changed the brackets, as I assume that was a table/field, not one big field name.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    bbarclay is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    17
    Worked. Sadly though, that was the whole field name. Auto generated wizard reporting got the best of it I've since shortened it.

    Thank you.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Odd, because I didn't think Access would let you name a field with a period in it. Anyhow, glad it's working for you.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Passing criteria "NULL" or "IS NOT NULL" to a query
    By SgtSaunders69 in forum Forms
    Replies: 1
    Last Post: 12-24-2011, 02:22 AM
  2. Replies: 5
    Last Post: 04-03-2011, 10:24 PM
  3. Passing a NULL value to a date field
    By lman in forum Queries
    Replies: 2
    Last Post: 02-22-2011, 02:20 PM
  4. bypassing passing parameter when null
    By cowboy in forum Queries
    Replies: 11
    Last Post: 04-14-2010, 09:59 PM
  5. If Form Field is not null then...
    By cotri in forum Forms
    Replies: 5
    Last Post: 01-12-2010, 11: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