Results 1 to 4 of 4
  1. #1
    williec00 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2013
    Posts
    2

    Questions database

    Hello,

    I am new to the forums and definitely new to Access! But trying to throw myself into the fire, if you will. I am attempting to create a database of trivia questions that will be used to store all my questions and then show me all questions that fall under a given category.

    So far, I have created a table with the following columns: questionID(auto number), questionTxt, answerTxt, keyword1Txt, keyword2Txt, keyword3Txt, keyword4Txt, keyword5Txt. I will be inputting my questions and answers into these fields. Once have inputted the thousands of questions into the table, I would like to be able to use a checkbox to check all possible keywords (by searching keyword1Txt-keyword5Txt) and then pull up the question and answer for any and all that match the checked boxes. Some questions will only have 1 keyword, I have allowed for up to 5.

    I have no idea how to create the user interface portion, that is, the box with the categories that can be checked or how to get it to show the report of the questions and answers. If anyone could point me in the right direction, it would be MUCH appreciated.



    Thank you

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    So you want to have a form where you enter a word in a textbox (or select from a combobox dropdown list) that will be used to compare with the keyword fields and return records where there is a match? Build a query that uses the value as filter criteria. Something like:

    SELECT * FROM tablename WHERE keyword1Txt = Forms!formname.comboboxname OR keyword2Txt = Forms!formname.comboboxname OR keyword3Txt = Forms!formname.comboboxname OR keyword4Txt = Forms!formname.comboboxname

    Use that query as the RecordSource for a report.

    No checkboxes needed.
    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.

  3. #3
    williec00 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Aug 2013
    Posts
    2

    Multiple keywords

    Quote Originally Posted by June7 View Post
    So you want to have a form where you enter a word in a textbox (or select from a combobox dropdown list) that will be used to compare with the keyword fields and return records where there is a match? Build a query that uses the value as filter criteria. Something like:

    SELECT * FROM tablename WHERE keyword1Txt = Forms!formname.comboboxname OR keyword2Txt = Forms!formname.comboboxname OR keyword3Txt = Forms!formname.comboboxname OR keyword4Txt = Forms!formname.comboboxname

    Use that query as the RecordSource for a report.

    No checkboxes needed.
    Thank you for the quick response June7 (and the fact that you have endeavored to help a neophyte!) I do have a question though. Like I said, some questions will fall under multiple keywords... for instance a music question about U2 could be keyword1Txt=Music keyword2Txt=90s keyword3Txt=PopCulture keyword4Txt=Ireland keyword5Txt= RocknRoll

    The reason I wanted the checkbox was that I might need a question that is a 90s PopCulture question. I could then tic the 90s box and the PopCulture box and all the questions with both these keywords would then be shown.

    Do you think multiple combobox dropdowns are a better solution?

    I would also like to have the option to enter a word into a text box but then I would want that query to search the questionTxt and answerTxt fields. (pretty sure I can get this part done, heh)

    Thank you again for being so helpful!!!!!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    Yes, multiple combobox dropdowsn better. Then probably need to use LIKE operator with wildcard. Review

    http://datapigtechnologies.com/flash...tomfilter.html

    http://datapigtechnologies.com/flash...mtoreport.html
    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. Few relational database questions
    By rik1254 in forum Access
    Replies: 10
    Last Post: 12-13-2012, 01:13 PM
  2. Questions about starting first database
    By JM9x in forum Access
    Replies: 15
    Last Post: 09-10-2011, 04:26 AM
  3. Database of Maths Questions
    By akash2824 in forum Access
    Replies: 2
    Last Post: 05-01-2011, 06:05 AM
  4. First Database Questions...
    By qu1ckdry in forum Database Design
    Replies: 0
    Last Post: 03-01-2010, 09:33 AM
  5. questions on designing database
    By schultzy in forum Access
    Replies: 1
    Last Post: 07-18-2009, 03:44 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