[Show all top banners]

Nepalover
Replies to this thread:

More by Nepalover
What people are reading
Subscribers
:: Subscribe
Back to: Computer/IT Refresh page to view new replies
 Question for MS ACCESS GURU

[Please view other pages to see the rest of the postings. Total posts: 48]
PAGE: <<  1 2 3  
[VIEWED 15479 TIMES]
SAVE! for ease of future access.
The postings in this thread span 3 pages, go to PAGE 1.

This page is only showing last 20 replies
Posted on 09-14-06 2:05 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Guys,
I have a little complicated access question, I would appreciate if any of you can help me. Here is the scenario:
I have a query that is pulling different boxes from the table, let say the boxes are A, B, C, D and E. In the query, I need to perform some calculation, however, those calculations are not the same for all the boxes. For box A - the calculation should be A/2, for B - calculation should be B*2, for C - C*25 etc. Is this even possible in access?

Thanks in advance for your help!
 
The postings in this thread span 3 pages, go to PAGE 1.

This page is only showing last 20 replies
Posted on 09-18-06 11:05 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Sorry, that was a typo... I ran it after getting rid of that comma... still getting the compile error.

Thanks
 
Posted on 09-18-06 11:39 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

What are the datatypes of Process and TransactionsCompleted fields?
 
Posted on 09-18-06 12:53 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Nepal lover, my guess is your data type must be screwed up! Here is what you should do:

 
Posted on 09-18-06 12:54 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Original table

 
Posted on 09-18-06 12:55 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 
 
Posted on 09-18-06 12:55 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 
 
Posted on 09-18-06 12:56 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Sorry for not resizing the big images.
 
Posted on 09-18-06 1:37 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Batuwa,
That is exactly what I have. I have Transactionscompleted as a numeric (number) field. I have the SQL typed in exactly as you have.
 
Posted on 09-18-06 1:43 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Either your install of Access is faulty, try to reinstall access , or perhaps your computer doesn't have enuff juice for the query, try it on a different computer.
 
Posted on 09-18-06 1:47 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

One more thing, I have 4 fields in the table:

UserID Process TransactionsCompleted Date

Would that be a problem that I'm not including the 2 other column names in the SQL (UserID and Date)?
 
Posted on 09-18-06 1:49 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

First of all, check your code again. Carefully check for any missing or unnecessary commas or quotes. Sometimes you need second set of eyes. Try in some other computers than yours if you're in lab.
 
Posted on 09-18-06 1:51 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

can u post the screen shots of your orignal table and SQL?
 
Posted on 09-18-06 2:14 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I'm not able to upload the screenshot (word doc) here. What format did you use?
 
Posted on 09-18-06 2:17 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Do a search in google for 'compile error query microsoft access'

What it points to is that the Access database in your computer might not have some specific component/modules requered for the query.

Either try to reinstall access or use it on another computer.
 
Posted on 09-18-06 2:37 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I will try that. Thank you!
 
Posted on 09-25-06 11:49 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Batuwa,
I used the following query and it worked:

SELECT Fruit, Num, IIf([Fruit]='Apple',Num*3) AS AppleSlice, IIf([Fruit]='Orange',Num/2) AS OrangeSlice, IIf([Fruit]='Banana',Num+3) AS BananaSlice
FROM Table1;


But I also need to have the last column (total column) that should add Appleslice, OrangeSlice, BananaSlice and give the total numbers of all fruits. How do I add the statement to add the running total of those fruit slices and add them all together?

I appreciate your help and

Happy Bijaya Dashami!
 
Posted on 09-27-06 12:36 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Nepalover,
Sorry for not seeing this thread. Do you still need help with this? I guess you have to use SUM function within the SQL, and try to get running total, but I have to see how it exactly works.

Happy dashain:)
 
Posted on 09-27-06 12:55 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

how about

SELECT Fruit, Num, IIf([Fruit]='Apple',Num*3) AS AppleSlice, IIf([Fruit]='Orange',Num/2) AS OrangeSlice, IIf([Fruit]='Banana',Num+3) AS BananaSlice, appleslice+oranceslice+bananaslice as newcolumn
FROM Table1;
 
Posted on 11-01-06 1:17 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Bhusan bro and Batuwa bro,

I've one more question in regards to this. If I want to add everything else other than the one mentioned, how do I do that. For e.g. If it is not apple, orange, banana, strawberry then I want to show them on the last column as miscellaneous.

I tried the following statement in addition to the SQL statements that I'm using:

IIf([Off Code]<> 'A1' or 'A2' or 'R1' or 'R2' or 'R3' or 'SP' or 'AN' or 'I1' or 'V1',[TransactionsCompleted]) AS Miscellaneous
FROM TBLSysTransTriageTG

However, the miscellaneous column is giving me the total from those fields. Basically, I need to know how to write a "not equal to" statement.

Thank you guys a lot for your help.
 
Posted on 11-01-06 4:39 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

batuwa

I want copy the access page can you show how did you copy the access page
 



PAGE: <<  1 2 3  
Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 365 days
Recommended Popular Threads Controvertial Threads
शीर्षक जे पनि हुन सक्छ।
NRN card pros and cons?
TPS Re-registration case still pending ..
What are your first memories of when Nepal Television Began?
Anybody gotten the TPS EAD extension alert notice (i797) thing? online or via post?
TPS Re-registration
Democrats are so sure Trump will win
Basnet or Basnyat ??
TPS EAD auto extended to June 2025 or just TPS?
nrn citizenship
Toilet paper or water?
Sajha has turned into MAGATs nest
Nas and The Bokas: Coming to a Night Club near you
Mamta kafle bhatt is still missing
ढ्याउ गर्दा दसैँको खसी गनाउच
ChatSansar.com Naya Nepal Chat
whats wrong living with your parents ?
डीभी परेन भने खुसि हुनु होस् ! अमेरिकामाधेरै का श्रीमती अर्कैसँग पोइला गएका छन् !
3 most corrupt politicians in the world
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
Nas and The Bokas: Coming to a Night Club near you
Mr. Dipak Gyawali-ji Talk is Cheap. US sends $ 200 million to Nepal every year.
TPS Update : Jajarkot earthquake
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters