[VIEWED 15619
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
|
|
Nepalover
Please log in to subscribe to Nepalover's postings.
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
|
|
Nepalover
Please log in to subscribe to Nepalover's postings.
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
|
|
|
bhusan
Please log in to subscribe to bhusan's postings.
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?
|
|
|
batuwa
Please log in to subscribe to batuwa's postings.
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:
|
|
|
batuwa
Please log in to subscribe to batuwa's postings.
Posted on 09-18-06 12:54
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
Original table
|
|
|
batuwa
Please log in to subscribe to batuwa's postings.
Posted on 09-18-06 12:55
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
Query
|
|
|
batuwa
Please log in to subscribe to batuwa's postings.
Posted on 09-18-06 12:55
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
Output
|
|
|
batuwa
Please log in to subscribe to batuwa's postings.
Posted on 09-18-06 12:56
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
Sorry for not resizing the big images.
|
|
|
Nepalover
Please log in to subscribe to Nepalover's postings.
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.
|
|
|
bhusan
Please log in to subscribe to bhusan's postings.
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.
|
|
|
Nepalover
Please log in to subscribe to Nepalover's postings.
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)?
|
|
|
batuwa
Please log in to subscribe to batuwa's postings.
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.
|
|
|
batuwa
Please log in to subscribe to batuwa's postings.
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?
|
|
|
Nepalover
Please log in to subscribe to Nepalover's postings.
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?
|
|
|
bhusan
Please log in to subscribe to bhusan's postings.
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.
|
|
|
Nepalover
Please log in to subscribe to Nepalover's postings.
Posted on 09-18-06 2:37
PM
Reply
[Subscribe]
|
Login in to Rate this Post:
0
?
|
|
I will try that. Thank you!
|
|
|
Nepalover
Please log in to subscribe to Nepalover's postings.
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!
|
|
|
batuwa
Please log in to subscribe to batuwa's postings.
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:)
|
|
|
bhusan
Please log in to subscribe to bhusan's postings.
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;
|
|
|
Nepalover
Please log in to subscribe to Nepalover's postings.
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.
|
|
|
vandam
Please log in to subscribe to vandam's postings.
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
|
|