Add Searchable Tags to a Database Record

Posted on 2008-11-17
Last Modified: 2013-11-29
I have been asked to develop a database of general contractors and their specialties.  I have a certain set of specialties that the majority of contractors will fall into, but I'd like to add the ability for users to add tags to each company.  I would also like the ability to include these tags in queries/filters.  Is this possible using MS-Access as a front end to a SQL Server back end?
Question by:AaronGreene1906
    LVL 65

    Accepted Solution

    You could create another table which holds the tags

    ID, ContractorID, Tag

    ID = unique id to this table (autonumber for example)
    ContractorID = ID to the contractor record
    Tag = your keyword

    one keyword, one record

    So now this is a one-many relationship with your contractors table.

    You can now query based on this table to find contractors

    LVL 74

    Expert Comment

    by:Jeffrey Coachman

    Just some notes on these "Free Form" tags:

    The issue with these "Free Form" tags is that very often they end up not being very consistient.
    Thus yeilding inaccurate/unpredictable/inconsistient query results.

    Someone searches for "Wood Worker", while it is input as "WoodWorker"
    Is it "Drywall" or "SheetRock", is it spelled with two words or one?
    Should the search for "Payroll" or "Salary"

    How will you limit the data stored in these "Tags"?
    Supose someone starts putting in personal notes: "Does not show up on time" "Smells like cigarettes"
    (How would you search data like this?)

    Lastly you must consider How you will construct these queries.
    ("AND" Logic, "OR" logic, combinations of AND and OR, Contains, Starts with, Ends with, ...ect)

    LVL 84
    I have a very similar situation as Jeff describes with my main client.

    They always want ways to "tag" items, so they can (supposedly) search for them more quickly when needed. I implemented something like rocki suggested, and get fairly regular complaints that "I searched for a tag of 'DN001', which I know exists, and it doesn't find anything". Of course, a quick check shows the tag entered as "DN 001" or "DN-001", which then elicits the response "the system should be agile enough to find this" ... to which I respond "it can be agile enough, if your Purchase Order is large enough" and that pretty much ends the exchange.

    IOW, be careful of implementing features like this, and make sure your clients understand the limitations that go along with free-form text entry.
    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    "it can be agile enough, if your Purchase Order is large enough"
    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    To All,

    Just so we are clear.

    I am in no way saying that rockiroads' post should not be used.

    On the contrary, what rockiroads has proposed, is the standard way of doing things like this, and as such, qualifies as a valid solution.

    I was just alerting you to some of the issues you may run into by using "Free Text"

    An enhancement might be to create a list, (However long), of specific *One Word* keyword search terms.
    And create a dropdown in conjunction with rockiroads' post.

    So you can use this dropdown to add the multiple search terms for each company.
    This way you have some measure of control over what is entered, and ultimately searched for.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now