Results 1 to 6 of 6
  1. #1
    data808 is offline Noob
    Windows 8 Access 2007
    Join Date
    Aug 2012
    Posts
    727

    Long text or memo box filtering

    I have a long text box or memo box that I would like to filter but do not know how. Can someone point me in the right direction on how to set up a filtering feature to use for these types of boxes? I have no problems with short text boxes.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    a far as I know (this is old knowledge I haven't messed with memo fields in a while) you can't use criteria similar to

    Like *FIND THIS*

    you would likely have to have an 'indicator' field

    HasString: instr([MemoFieldName], "FIND THIS")

    then anything with a HASSTRING value of greater than zero would contain the search string.

  3. #3
    data808 is offline Noob
    Windows 8 Access 2007
    Join Date
    Aug 2012
    Posts
    727
    Ok thanks.

    What about duplicate filtering using a long text box? The thing is, I used the query wizard to create this and I can get it to work, however, the duplicates have to be identical. In my long text boxes I have serial number entered, sometimes containing more than 1 serial number. I would like the query to pick up the serial number even though it may have a different combination of serials in one field but if one of those serial numbers has been used before in another record, I would like it to show it. Here is an example:

    If user enters this in two separate records:
    Serial #s: 123456, 789456, 456789
    Serial #s: 741852, 852963, 123456

    I would like these records to show in the query because even though these records have 3 serial numbers each, the serial # 123456 is used in both records. Is this possible?

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    You're talking about storing multiple values in a single field (or using a multi value field) which is a really bad idea. Without a normalized structure you have to rely on the data being in a specific format (in this case a comma followed by a space). I would strongly advise you to use a normalized structure, in your case, when you need to store a series of serial numbers store them as they relate to a specific object (perhaps components of a larger item). What you're asking is possible but you would have to parse the text string for each value and compare that to every value in every other field and that is incredibly inefficient.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    I agree with rpeare that designing and using normalized tables is the best strategy.

    But. here is a small test, that may be helpful.

    In a table "A" there are 3 records. TestMemo is a memo field. The other fields have no meaning - it's just a table for testing. Records 1 and 3 have the "123456" within the testmemo field, record 2 does not.
    It's possible to find records containing a string in the testmemo field.

    You could alter your form/report recordsource with a revised query, and requery.

    It's not exactly your Filter, by accomplishes same thing.
    Query SQL
    Code:
    SELECT Len([testmemo]) AS LEN_A, A.*
    FROM A
    WHERE (((A.testmemo) Like "*" & "123456" & "*"));
    QueryResult
    Code:
    LEN_A id mmonthYr dday hrs taskid testmemo
    662 1 32010 10 10.00 100 123456, 789456, 456789You're talking about storing multiple values in a single field (or using a multi value field) which is a really bad idea. Without a normalized structure you have to rely on the data being in a specific format (in this case a comma followed by a space). I would strongly advise you to use a normalized structure, in your case, when you need to store a series of serial numbers store them as they relate to a specific object (perhaps components of a larger item). What you're asking is possible but you would have to parse the text string for each value and compare that to every value in every other field and that is incredibly inefficient.
    1377 3 42010 10 11.00 101 Serial #s: 741852, 852963, 123456What about duplicate filtering using a long text box? The thing is, I used the query wizard to create this and I can get it to work, however, the duplicates have to be identical. In my long text boxes I have serial number entered, sometimes containing more than 1 serial number. I would like the query to pick up the serial number even though it may have a different combination of serials in one field but if one of those serial numbers has been used before in another record, I would like it to show it. Here is an example:What about duplicate filtering using a long text box? The thing is, I used the query wizard to create this and I can get it to work, however, the duplicates have to be identical. In my long text boxes I have serial number entered, sometimes containing more than 1 serial number. I would like the query to pick up the serial number even though it may have a different combination of serials in one field but if one of those serial numbers has been used before in another record, I would like it to show it. Here is an example: If user enters this in two separate records: Serial #s: 123456, 789456, 456789 Serial #s: 741852, 852963, 123456 I would like these records to show in the query because even though these records have 3 serial numbers each, the serial # 123456 is used in both records. Is this possible?
    Attached Thumbnails Attached Thumbnails AWithMemoField.jpg  

  6. #6
    data808 is offline Noob
    Windows 8 Access 2007
    Join Date
    Aug 2012
    Posts
    727
    You guys are both right as I have noticed that the data that would need to be entered by the user would have to very specific in its structure and would not be a good way to look for data. Some of the data would probably end up being over looked and never seen. I don't think I will move forward with this approach. Thanks for bringing light to this matter. Appreciate it.

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

Similar Threads

  1. how much text in long integer field?
    By accessmatt in forum Database Design
    Replies: 10
    Last Post: 12-22-2014, 03:54 PM
  2. Long Text Box
    By data808 in forum Access
    Replies: 5
    Last Post: 09-24-2014, 12:26 AM
  3. Replies: 2
    Last Post: 07-09-2014, 06:41 PM
  4. Is it possible to make 'long text' longer?
    By rgrstvr in forum Access
    Replies: 1
    Last Post: 07-04-2014, 06:37 PM
  5. Text too long, error message
    By taylormotm in forum Access
    Replies: 13
    Last Post: 06-18-2009, 07:24 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