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
|
|||
|
|||
If Statement
Hi,
I have a query with two fields, one is [Total Volume] the other is [Estimate]. Is it possible to create a query that will give me the following results, and if so how? If [Estimate] = "e" Then [Total Volume] = 0 Any help would be greatly appreciated. Thanks, WP |
#2
|
|||
|
|||
If Statement
Are you trying to set the value of [Total Volume] to 0 for every record in
your table where the value of [Estimate] is 0? If so then you can run the following update query: UPDATE YourTable SET [Total Volume] = 0 WHERE [Estimate] = "e"; If that is not what you want then feel free to post more information. -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "wperez" wrote in message ... Hi, I have a query with two fields, one is [Total Volume] the other is [Estimate]. Is it possible to create a query that will give me the following results, and if so how? If [Estimate] = "e" Then [Total Volume] = 0 Any help would be greatly appreciated. Thanks, WP |
#3
|
|||
|
|||
If Statement
Hi,
Sorry I should have been more specific and perhaps this is really a report question. I created a query in order to build a report (there are multiple fields in the query not related to the question). I do not want to update the information in the table itself but for my report purposes I need the value of [Total Volume] to be "0" or blank if [Estimate] = 0 Thanks, WP "Lynn Trapp" wrote: Are you trying to set the value of [Total Volume] to 0 for every record in your table where the value of [Estimate] is 0? If so then you can run the following update query: UPDATE YourTable SET [Total Volume] = 0 WHERE [Estimate] = "e"; If that is not what you want then feel free to post more information. -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "wperez" wrote in message ... Hi, I have a query with two fields, one is [Total Volume] the other is [Estimate]. Is it possible to create a query that will give me the following results, and if so how? If [Estimate] = "e" Then [Total Volume] = 0 Any help would be greatly appreciated. Thanks, WP |
#4
|
|||
|
|||
If Statement
Sorry this is if [Estimate]="e"
"wperez" wrote: Hi, Sorry I should have been more specific and perhaps this is really a report question. I created a query in order to build a report (there are multiple fields in the query not related to the question). I do not want to update the information in the table itself but for my report purposes I need the value of [Total Volume] to be "0" or blank if [Estimate] = 0 Thanks, WP "Lynn Trapp" wrote: Are you trying to set the value of [Total Volume] to 0 for every record in your table where the value of [Estimate] is 0? If so then you can run the following update query: UPDATE YourTable SET [Total Volume] = 0 WHERE [Estimate] = "e"; If that is not what you want then feel free to post more information. -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "wperez" wrote in message ... Hi, I have a query with two fields, one is [Total Volume] the other is [Estimate]. Is it possible to create a query that will give me the following results, and if so how? If [Estimate] = "e" Then [Total Volume] = 0 Any help would be greatly appreciated. Thanks, WP |
#5
|
|||
|
|||
If Statement
Ah, in that case, put an unbound control on your report and put the
following in the control source: =IIF([Estimate] = "e", 0, [Total Volume]) -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "wperez" wrote in message ... Hi, Sorry I should have been more specific and perhaps this is really a report question. I created a query in order to build a report (there are multiple fields in the query not related to the question). I do not want to update the information in the table itself but for my report purposes I need the value of [Total Volume] to be "0" or blank if [Estimate] = 0 Thanks, WP "Lynn Trapp" wrote: Are you trying to set the value of [Total Volume] to 0 for every record in your table where the value of [Estimate] is 0? If so then you can run the following update query: UPDATE YourTable SET [Total Volume] = 0 WHERE [Estimate] = "e"; If that is not what you want then feel free to post more information. -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "wperez" wrote in message ... Hi, I have a query with two fields, one is [Total Volume] the other is [Estimate]. Is it possible to create a query that will give me the following results, and if so how? If [Estimate] = "e" Then [Total Volume] = 0 Any help would be greatly appreciated. Thanks, WP |
#6
|
|||
|
|||
If Statement
Thank you so much for you help! It worked perfectly.
"Lynn Trapp" wrote: Ah, in that case, put an unbound control on your report and put the following in the control source: =IIF([Estimate] = "e", 0, [Total Volume]) -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "wperez" wrote in message ... Hi, Sorry I should have been more specific and perhaps this is really a report question. I created a query in order to build a report (there are multiple fields in the query not related to the question). I do not want to update the information in the table itself but for my report purposes I need the value of [Total Volume] to be "0" or blank if [Estimate] = 0 Thanks, WP "Lynn Trapp" wrote: Are you trying to set the value of [Total Volume] to 0 for every record in your table where the value of [Estimate] is 0? If so then you can run the following update query: UPDATE YourTable SET [Total Volume] = 0 WHERE [Estimate] = "e"; If that is not what you want then feel free to post more information. -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "wperez" wrote in message ... Hi, I have a query with two fields, one is [Total Volume] the other is [Estimate]. Is it possible to create a query that will give me the following results, and if so how? If [Estimate] = "e" Then [Total Volume] = 0 Any help would be greatly appreciated. Thanks, WP |
#7
|
|||
|
|||
If Statement
You are quite welcome.
-- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "wperez" wrote in message ... Thank you so much for you help! It worked perfectly. "Lynn Trapp" wrote: Ah, in that case, put an unbound control on your report and put the following in the control source: =IIF([Estimate] = "e", 0, [Total Volume]) -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "wperez" wrote in message ... Hi, Sorry I should have been more specific and perhaps this is really a report question. I created a query in order to build a report (there are multiple fields in the query not related to the question). I do not want to update the information in the table itself but for my report purposes I need the value of [Total Volume] to be "0" or blank if [Estimate] = 0 Thanks, WP "Lynn Trapp" wrote: Are you trying to set the value of [Total Volume] to 0 for every record in your table where the value of [Estimate] is 0? If so then you can run the following update query: UPDATE YourTable SET [Total Volume] = 0 WHERE [Estimate] = "e"; If that is not what you want then feel free to post more information. -- Lynn Trapp MS Access MVP www.ltcomputerdesigns.com Access Security: www.ltcomputerdesigns.com/Security.htm "wperez" wrote in message ... Hi, I have a query with two fields, one is [Total Volume] the other is [Estimate]. Is it possible to create a query that will give me the following results, and if so how? If [Estimate] = "e" Then [Total Volume] = 0 Any help would be greatly appreciated. Thanks, WP |
Thread Tools | |
Display Modes | |
|
|