Professional Web Applications Themes

use form to enter report criteria - Microsoft Access

I'm using a form to enter report criteria with a combo box for badge and date. Is there a way to leave the badge blank if I don't want to reduce the number of records by the badge criteria for that particular view of the report? Thanks. Mary...

  1. #1

    Default use form to enter report criteria

    I'm using a form to enter report criteria with a combo box
    for badge and date. Is there a way to leave the badge
    blank if I don't want to reduce the number of records by
    the badge criteria for that particular view of the
    report? Thanks.

    Mary
    Mary Guest

  2. #2

    Default Re: use form to enter report criteria

    Assuming your report is based on a query that references this form, modify
    the WHERE clause

    WHERE Badge = Forms!YourForm!cboBadge or Forms!YourForm!cboBadge Is Null

    --
    Joan Wild
    Microsoft Access MVP

    "Mary" <mscardinaaol.com> wrote in message
    news:0d2601c356a7$56e5be10$a401280aphx.gbl...
    > I'm using a form to enter report criteria with a combo box
    > for badge and date. Is there a way to leave the badge
    > blank if I don't want to reduce the number of records by
    > the badge criteria for that particular view of the
    > report? Thanks.
    >
    > Mary

    Joan Wild Guest

  3. #3

    Default use form to enter report criteria

    there aqre several ways to control which records appear in
    a report so i'll assume that your report is bound to a
    table or query.
    The follwoing example is a line of code that is executed
    by a button on a form. The form also has a combobox call
    cbo_strFName

    DoCmd.OpenReport "rpt_Test", acPreview, , "strFName
    Like '*" & cbo_strFName & "*'"

    This code opens the report "rpt_Test" in preview mode
    which only displays the records that meet the content of
    the combobox. If the combobox is left blank then all
    records will show. This is because I use the * wildcard
    before and after ther combobox value.

    Hope it helps... Bish
    >-----Original Message-----
    >I'm using a form to enter report criteria with a combo
    box
    >for badge and date. Is there a way to leave the badge
    >blank if I don't want to reduce the number of records by
    >the badge criteria for that particular view of the
    >report? Thanks.
    >
    >Mary
    >.
    >
    Bish Guest

Similar Threads

  1. Multiple criteria from FORM field in a quiry
    By fluiter in forum Coldfusion Database Access
    Replies: 1
    Last Post: September 29th, 08:53 PM
  2. Building Query criteria dynamically based on Form inputs
    By Beards247 in forum Coldfusion - Advanced Techniques
    Replies: 4
    Last Post: August 2nd, 06:59 AM
  3. Making a date criteria in a form
    By James Summerlin in forum Microsoft Access
    Replies: 1
    Last Post: July 11th, 01:40 PM
  4. Replies: 1
    Last Post: July 10th, 06:10 AM
  5. Form Control to celect Rep.Criteria
    By Robert in forum Microsoft Access
    Replies: 0
    Last Post: June 30th, 01:39 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139