yes/no in query

C

C. Claes

Hi,

I have three tables: tbl_cust with customer data (client_ID, number, name,
adress, ...), tbl_priceincrease with increase_ID, date of price increase,
increase percentage and tbl_incrapplic with client_id, increase_id and
application (yes/no).

The price-increases are not always applicated with every client. So it could
be possible that the increase of 2001 is applicated, that of 2002 is not,
2003 not and 2004 yes.
What I'm trying to achieve is to have in a subform an overview of all the
price increases there could have been and tick in my yes/no box whether the
increase was done yes or no. The content of the subform is linked to a
combobox with all my clients in it.

Questions: 1. do I need to set relations between my three tables and if so
which ones? (I've tried several possibilities, but no result)
2. how do I get the overview of the price increases in a
subform with the yes/no box to work (now I get 'Recordset is not
updatable').

Thanks for any advice or help.

Chris
 
M

Michel Walsh

Hi,


You don't supply a lot of details about the query that (seems to) work.


If you use:

SELECT... FROM table1, table2 WHERE table1.field1=table2.field2

try, instead

SELECT ... FROM table1 INNER JOIN table2 ON table1.field1=table2.field2


in other word, if the WHERE clause (criteria) involves two different tables,
move that portion of the criteria into a JOIN. Ideally, only use conditions
implying just one table at a time, in the WHERE clause, like:



.... WHERE (table1.field1 = 33) AND ( table2.field3 >= 100 )



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Yes / No query problem 4
Stock Price History Criteria 2
YES /NO Query 1
Yes / Yes + N Responses for percentage 4
Need Macro... 8
Yes/No parameter for Yes or No or Both 7
Yes/No Field Size 6
query yes/no field 6

Top