Results 1 to 2 of 2
  1. #1
    pwdpwd is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2010
    Location
    UK - Barnsley
    Posts
    6

    Passing specific Combobox info to a query


    Hi - hope someone can help.

    What I'm trying to do is to select service dates within a 53 week year - and the year doesn't always start on the 1st Jan. When I use specific criteria in the ServiceDate field in the query (dd/mm/yyyy) to

    "Between #28/12/2009# And (#28/12/2009#+371)"

    it works fine.

    When I use a text box (set to dd/mm/yyyy) and set the criteria to

    "Between Forms!FRM_FormName!TextBox and (Forms!FRM_FormName!TextBox +371)"

    it also works fine

    I don't want the user to have to remember the exact start date of each year, so I created a tbltablestartdate tabe; with 3 fields - ID, year and yearstartdate.

    On the form I created & bound a combobox to that table, but only display the year. I want to let the user select the year (yyyy) but use the yearstartdate (dd/mm/yyyy) as the criteria in the query. I tried substituting 'Combobox' for 'TextBox' but that doesnt work, as (presumably) the combobox is passing the data for the year, not the yearsstartdate.

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    Have you tried to build an unbound date based upon the combo box and then use that unbound control in your filter?

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

Similar Threads

  1. Query Out Specific Text
    By ysabella in forum Queries
    Replies: 1
    Last Post: 11-19-2015, 03:53 AM
  2. Replies: 0
    Last Post: 12-16-2009, 01:14 PM
  3. Replies: 1
    Last Post: 11-10-2009, 03:20 PM
  4. Query based on Value in a Combobox
    By martinwd in forum Queries
    Replies: 3
    Last Post: 06-02-2009, 02:21 PM
  5. Passing a value from a variable to an update query
    By MUKUDU99 in forum Programming
    Replies: 0
    Last Post: 08-24-2008, 11:14 PM

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