A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

yes/no in query



 
 
Thread Tools Display Modes
  #1  
Old July 3rd, 2005, 06:23 PM
C. Claes
external usenet poster
 
Posts: n/a
Default 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  
Old July 4th, 2005, 04:54 PM
Michel Walsh
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 11:51 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.