Results 1 to 7 of 7
  1. #1
    Exwarrior187 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    13

    Advanced Query

    Greetings all. I'm struggling with a Query and I'm seeking knowledge.



    I have a DB all nice and set up and working the way it needs to. Now were looking to extract information from my nice DB. The problem is I'm looking for information in a "Notes / Comments" field, the data type is 'Memo'. Ultimately what I'm looking for would be something to the affect of:

    A Query for:

    [Prompt for a Date] + "a string of text".

    Thanks in advance.

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    WHERE fieldname = [Please insert date (mm/dd/yyy)] & " your text here"

  3. #3
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    I wrote a wong post and deleted it.

  4. #4
    Exwarrior187 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    13
    Quote Originally Posted by TheShabz View Post
    WHERE fieldname = [Please insert date (mm/dd/yyy)] & " your text here"

    Thank you for the reply. Not sure if it's my syntax or something but it doesn't seem to work. Here's what I wrote:

    SELECT *
    FROM [Table Name]
    WHERE ((([Table Name].[Field Name]) = [Please insert date (mm/dd/yyyy)] & "*my text here*"));

    Any ideas. The Date + String that I'm looking could be part of a larger string altogether since this field is basically for notes. So there could be Text before and after it. Any ideas?

  5. #5
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    what do you prompt a date for?

    I think you are going to search for a text in the memo field, right?
    SELECT *
    FROM [Table Name]
    WHERE [Table Name].[Field Name] like "*" & [Text to search] & "*";

  6. #6
    Exwarrior187 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    13
    I got it working now, thanks all. Here is my solution which is derived of all the posts here:

    SELECT *
    FROM [TABLE NAME]
    WHERE [TABLE NAME].[FIELD NAME] like "*" & [Please Insert Date (mm/dd/yyyy)] & "*MY TEXT HERE*";

    Thanks again all!

  7. #7
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    how about "my text here" is in front of the inserted date?

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

Similar Threads

  1. Advanced filter form
    By akingsley in forum Forms
    Replies: 4
    Last Post: 10-10-2010, 11:28 AM
  2. Advanced Report Conditional Format
    By MrHoliday in forum Forms
    Replies: 2
    Last Post: 08-25-2010, 11:58 PM
  3. Advanced Searching
    By mbolster in forum Forms
    Replies: 3
    Last Post: 07-06-2010, 10:10 AM
  4. Advanced Report Filter
    By bigdan5428 in forum Reports
    Replies: 1
    Last Post: 05-08-2010, 08:17 PM
  5. Access versus FileMaker Pro Advanced
    By genesis in forum Access
    Replies: 1
    Last Post: 08-20-2009, 01:00 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