yes/no in query

  • Thread starter Thread starter C. Claes
  • Start date Start date
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
 
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
 
Back
Top