Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a list of documents, which have a number, and a revision date.. eg:-

    BK-001 How to cook food outdoors 1

    I would like to add a tagging system to this row, to allow easy filtering. so, i might tag this row with keywords like

    COOKING,OUTDOORS

    Ideally, i would like a good number of tags to be able to be allocated. so i thought perhaps a single text field. then i can write
    code to add, remove, modify text in the one string.. easy enough.

    but, how do i populate a dropdown, with all of the potential tags that could be created in the text fields, and to filter the
    dataset on those found tags.

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts
    If you are using Access 2007 in the accdb format you could use the multi-value field type, but in the mdb format you have to write lots of code to make this work with a text field, and you have the additional issue of 255 characters max. The traditional solution to this is to use a separate table which allows an unlimited number of "tags" and use a subform to select the different tags. With that you can use a drop-down in the subform to list the various tags that are available.

    (Another option you might look at is to use a multi-select list box and update the contents of a text field based on those items that have been selected. In some respects that is about as complicated as trying to do everything in code, but the display and selection process is nicer.)
    Wendell

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    This Post has an example db that stores a list of values as a comma separated string in one field, but displays them as a multiselect list box.
    This example is based on the Microsoft example referred to earlier in that thread.

    This still leaves the issue of adding to the list.

    Filtering would be staightforward. Have a combobox based on the list of values then filter, then use its afterupdate event.

    Code:
    if not isnull(me.combofilter) then
     me.filter = "[tag] like " & chr(34) & "*" & me.combofilter & "*" & chr(34)
     me.filteron =true
    else
     me.filter=""
     me.filteron=false
    end if
    More complicated would be to filter on multiple tags at once.
    Regards
    John



  4. #4
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Many thanks john and wend.. will have a look at the post and see whats best.

    I don't anticipate going beyond 255 characters per tag field.

    Steve

Posting Permissions

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