If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
yes/no in query
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 |
#2
|
|||
|
|||
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 "C. Claes" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
yes/no query question | WTG | General Discussion | 3 | January 24th, 2005 06:06 PM |
adding 2 fields including null entries | Jesse | Running & Setting Up Queries | 26 | January 18th, 2005 05:31 PM |
Big number gives error! | Sara Mellen | Running & Setting Up Queries | 8 | October 11th, 2004 02:48 AM |
Query to join records form 2 databases | bdehning | General Discussion | 5 | August 9th, 2004 03:09 PM |
Hidden files in Ms-Query cause ODBC connect errors or Query is wac | needyourhelp | General Discussion | 4 | July 12th, 2004 09:38 PM |