Results 1 to 2 of 2
  1. #1
    benjimillard is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1

    Selecting a str Date

    IIF( InStr(0,[Day],WeekdayName(Day(Date$()),0,"vbUseSystem"),1) >0 ,true, false)


    or something similar (but this gives me a data mismatch error) not great at VB coding but have a bit of C++

    i have a table that has a field that contains days such as monday teusday etc. the field can have more then one day eg "monday, thursday, Friday"
    i would like a query that would return the record when the curent day is included in that field
    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Second thread today about multi-value fields.

    Is this field set up as a combobox or listbox that allows simultaneous selection of multiple values or is it just a regular text string?

    If just text string:
    SELECT * FROM table WHERE DayField Like "*" & Format(Weekday(Date()),"dddd") & "*"));

    If is a multi-value field:
    SELECT * FROM table WHERE DayField.Value=Format(Weekday(Date()),"dddd");
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Selecting Earliest and latest date
    By kstyles in forum Queries
    Replies: 10
    Last Post: 12-31-2010, 03:04 PM
  2. Selecting Dates
    By jpalk in forum Queries
    Replies: 3
    Last Post: 05-21-2010, 06:08 AM
  3. Selecting between two dates
    By nicorvp in forum Queries
    Replies: 5
    Last Post: 05-04-2010, 08:17 AM
  4. Selecting next set of control No's
    By newtoAccess in forum Queries
    Replies: 0
    Last Post: 02-28-2010, 10:28 AM
  5. Selecting Just One Name Type
    By susan in forum Queries
    Replies: 1
    Last Post: 12-03-2009, 12:08 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