By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,453 Members | 961 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,453 IT Pros & Developers. It's quick & easy.

Command Button Filter Query Syntax Issue

P: 1

I have the current setup on a basic database:

Lessons Learned:Table
Lessons Learned:Query
DataEntry (Form)

On my Form, I have the different textboxes and dropdown boxes for entering the data into the Lessons Learned Table. I have an "Enter Record" button and a new "Find Lessons" button.

I want the "Find Lessons" button to find any entries in the Lessons Learned Table that match input from the DataEntry form. I can't seem to get the below query to work correctly:

SELECT [Lessons Learned].[Event], [Lessons Learned].[Date], [Lessons Learned].[Watchstation], [Lessons Learned].[Comment]
FROM [Lessons Learned]
WHERE [Lessons Learned].[Watchstation]=[Forms].[DataEntry].[Watchstation];

I realize this query only matches the field "Watchstation," but it doesn't even work correctly.

Thank you for the help!
Jan 7 '15 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,107
What are you trying to do with the Select Query you have? Stuff it into the Forms Record Source?

In a situation like this, I would not use a Where Clause and have the Form show every record, then set the Forms Filter as needed to limit the results.
Jan 7 '15 #2

Post your reply

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