472,101 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,101 software developers and data experts.

Query works by itself- no records in form

Hi I am still very new at this but need help with a database problem.

To make things simple, I have a database with a form (frmDataEntry) where users can input information (that mostly goes into the main table (tabFeedback) and later search for it. Ideally, I would like to search through user-input keywords to access the files taht match.

To do this, I created another table (tabKW) which stores all of the keywords upon entry and gives them a unique number (KeywordID). I also created a table (tabKWAssign) that would assign the unique number (item #) for the large record from frmDataEntry to a keyword by creating records including the KeywordID, the item #; and a unique number for the link.

For example: should a user input the key words "dog", "cat" into one record; and "cat", "mouse", into another the keyword identifiers would look like 1,2 then 2;3.

There is a listbox (showkey) that queries the tabKWAssign to show the specific keywords for each record Item #.

This seems to all work.

My problem is here: I would like the user to be able to filter the records by searching for keywords and I don't know how. Right now I have a query that works only when its used not in conjunction with the form that is this:

Expand|Select|Wrap|Line Numbers
  1. SELECT tabfeedback.[Item #], tabfeedback.[Log Date], tabfeedback.SI, tabfeedback.[Feedback/ Lessons Learned Description], tabfeedback.[Reference/Source Document (DOC #)], tabfeedback.Project, tabfeedback.User, tabfeedback.Nominator, tabfeedback.[Feedback Classification], tabfeedback.Disposition, tabfeedback.[Disposition Status], tabfeedback.[Final Disposition Date], tabfeedback.[Last Update], tabKWAssign.KeywordID
  2. FROM tabfeedback INNER JOIN tabKWAssign ON tabfeedback.[Item #] = tabKWAssign.[Item #]
  3. WHERE (((tabKWAssign.KeywordID)=[forms]![frmdataentry]![cboKWfind]));
cboKWfind is the combo box that displays the possible keywords from tabKW.

Why won't this work? Should I be going about this a different way? Please help, my job depends on this.

Thank you very much
Aug 1 '07 #1
1 1135
1,206 Expert 1GB
Hi, there. It seems you are on the right track. What are you using as the record source for your form?
Aug 8 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by David Shorthouse | last post: by
1 post views Thread by frizzle | last post: by
reply views Thread by Phil C. | last post: by
36 posts views Thread by Liam.M | last post: by
4 posts views Thread by Uriah Piddle | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.