Results 1 to 4 of 4

Thread: Writing Code

  1. #1
    Join Date
    Oct 2009
    Posts
    2

    Wink Unanswered: Writing Code

    I have a form with 6 checkboxes, a combo box to choose a state and datepickers..The results I am wanting will be obtained from 2 queries that are linked by a primary id (salesqry).
    I want to be able to pull results based on the one or more checkboxes and state I choose between two dates. The names of my 6 checkboxes are: intialcontact, sentletter, recdinfoprod, sentsubpkg, recdsgndocs, completed.
    Example: I check intialcontact checkbox on my form, I chose AZ between 10/01/09 to 10/20/09. Say I check initinal contact and sent letter for specific dates chosen and a state chosen. How do I go about writing VBA code to obtain results for different checkbox options chosen.
    I hope that wasn't too confusing.
    Thanks
    elaine

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Welcome to the forums.

    Martin Green has a pretty good lecture series on how to put VBA and SQL together. HTH!
    Me.Geek = True

  3. #3
    Join Date
    Oct 2009
    Posts
    2

    Vba

    I am fairly new to access 2003 so that website suggested is all foreign to me. I want to be able to choose more than one checkbox based on the state choosen and the dates chosen. I don't know if IIF statements in the query will do or not,,,
    A bit of background. the users will input various data into the table,,,,I have 5 date columns and 5 columns that are checkboxes,,,,when the checkbox is check the current date auto fills. Example,,,the user chose initial contact so the checkbox is check and because the checkbox is check the column next to it titled date of initial contact prefills with the current date. Say I have 20 initial contact boxes checked therefore 20 date field are filled with various dates...I want to be able to run a report that say if I chose initial contact between 10/1/9 and 10/15/9 for the state of AZ I will obtain those results. I want to be able to select more than one box say I select Initial contact and sent letter between 10/1/09 and 10/15/9 for the state of AZ,,,I want to obtain those results. In the table the fields with checkboxes must be check to obtain results.

  4. #4
    Join Date
    May 2005
    Posts
    1,191
    Quote Originally Posted by dcollard23
    I am fairly new to access 2003 so that website suggested is all foreign to me.
    Well, then I would suggest starting with lecture 1, and working your way through all six

    Have a look at our FAQ, noone's here to do your work for you, but we'll gladly point you in the right direction and lend a helping hand
    Me.Geek = True

Posting Permissions

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