Sign Up |  Live StatsLive Stats    Articles 35,345| Comments 159,790| Members 17,820, Newest waheguruhelpme| Online 204
Home Contact
 (Forgotten?): 
    Sikhism

   
                                                                     Your Banner Here!    

STRUCTURE confused

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 400 USD, Received: 35 USD (9%)
Please Donate...
Related Topics...
Thread Thread Starter Forum Replies Last Post
Structure Lana Information Technology 2 28-Jul-2006 08:37 AM
Structure - which way is best... Nathan Information Technology 1 28-Jul-2006 08:14 AM
proper structure Brian Information Technology 1 28-Jul-2006 08:09 AM
update structure but not data richard harris Information Technology 1 28-Jul-2006 08:08 AM
Datasheet Structure F1stman Information Technology 3 28-Jul-2006 08:03 AM


Tags
structure, confused
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:32 AM
lmv's Avatar lmv
Guest
 
Posts: n/a
   
   
STRUCTURE confused

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
I hope someone can understand my confusion:
I have a report that I need to subtract the "budget" from the "used" for
"Available"
Because this is all in columns on excel I cannot figure out the structure
for Access.
First should the budget table have the (150 categories) as the fields or the
records?

Categories will not change what changes is the budget that goes into each
category on each project.

Example: Main category 260 is made up of categories 260-268

Budget for projID ABCD is
$1000 for cat 260
$20 for cat 261
$20 for cat 262
$20 for cat 263
$20 for cat 264
0 for cat 265
$20 for cat 266
0 for cat 267
$20 for cat 268
---------------------
260TTL = $1120

I have used
$100 for cat 260
$5 for cat 261
$5 for cat 262
$5 for cat 263
$5 for cat 264
0 for cat 265
$5 for cat 266
0 for cat 267
$5 for cat 268

So I want the report to show all of that and then show what is still
available in each category. The above is just an example of what I am trying
to do. I don't know how to structure the budget table. I have tried both
ways. With the category being the field name and the cat#s being the records
and then the ABCDBudget being the fieldname and the amount added to the cat#
record.

Also tried cat#s are the field names and the record is ABCDBudget being the
record.

But I can't figure out how to total the 7 categories into the Main (260) to
get a total and in general I am just confused. Please help!!
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/12834-structure-confused.html
Thanks!

SELECT qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.OrderID,
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12834
qryPurchaseOrderRpt.CategoryID, qryPurchaseOrderRpt.MainCatID,
qryPurchaseOrderRpt.CategoryName, qryPurchaseOrderRpt.MainCatName,
[EST_S-84a].LEBAEst_Cost, qryPurchaseOrderRpt.ExtendedPrice,
CCur(Nz([LEBAEst_Cost]-[ExtendedPrice])) AS Available
FROM [EST_S-84a] INNER JOIN qryPurchaseOrderRpt ON [EST_S-84a].Category =
qryPurchaseOrderRpt.CategoryID
GROUP BY qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.OrderID,
qryPurchaseOrderRpt.CategoryID, qryPurchaseOrderRpt.MainCatID,
qryPurchaseOrderRpt.CategoryName, qryPurchaseOrderRpt.MainCatName,
[EST_S-84a].LEBAEst_Cost, qryPurchaseOrderRpt.ExtendedPrice
HAVING (((qryPurchaseOrderRpt.ProjectID) Like [What Project ID?
Example:LEBA] & "*") AND (([EST_S-84a].LEBAEst_Cost) Is Not Null));






 
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:32 AM
Steve Schapel's Avatar Steve Schapel
Guest
 
Posts: n/a
   
   
Re: STRUCTURE confused

Lmv,

Just one deep table, with these fields...
ProjID
Category
Budget
Used

In a query, you can make a field to group by, like this...
MainCat: [Category]-[Category] Mod 10
or...
MainCat: Int([Category]/10)*10

--
Steve Schapel, Microsoft Access MVP

lmv wrote:
> I hope someone can understand my confusion:
> I have a report that I need to subtract the "budget" from the "used" for
> "Available"
> Because this is all in columns on excel I cannot figure out the structure
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12834
> for Access.
> First should the budget table have the (150 categories) as the fields or the
> records?
>
> Categories will not change what changes is the budget that goes into each
> category on each project.
>
> Example: Main category 260 is made up of categories 260-268
>
> Budget for projID ABCD is
> $1000 for cat 260
> $20 for cat 261
> $20 for cat 262
> $20 for cat 263
> $20 for cat 264
> 0 for cat 265
> $20 for cat 266
> 0 for cat 267
> $20 for cat 268
> ---------------------
> 260TTL = $1120
>
> I have used
> $100 for cat 260
> $5 for cat 261
> $5 for cat 262
> $5 for cat 263
> $5 for cat 264
> 0 for cat 265
> $5 for cat 266
> 0 for cat 267
> $5 for cat 268
>
> So I want the report to show all of that and then show what is still
> available in each category. The above is just an example of what I am trying
> to do. I don't know how to structure the budget table. I have tried both
> ways. With the category being the field name and the cat#s being the records
> and then the ABCDBudget being the fieldname and the amount added to the cat#
> record.
>
> Also tried cat#s are the field names and the record is ABCDBudget being the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12834
> record.
>
> But I can't figure out how to total the 7 categories into the Main (260) to
> get a total and in general I am just confused. Please help!!
> Thanks!
>
> SELECT qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.OrderID,
> qryPurchaseOrderRpt.CategoryID, qryPurchaseOrderRpt.MainCatID,
> qryPurchaseOrderRpt.CategoryName, qryPurchaseOrderRpt.MainCatName,
> [EST_S-84a].LEBAEst_Cost, qryPurchaseOrderRpt.ExtendedPrice,
> CCur(Nz([LEBAEst_Cost]-[ExtendedPrice])) AS Available
> FROM [EST_S-84a] INNER JOIN qryPurchaseOrderRpt ON [EST_S-84a].Category =
> qryPurchaseOrderRpt.CategoryID
> GROUP BY qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.OrderID,
> qryPurchaseOrderRpt.CategoryID, qryPurchaseOrderRpt.MainCatID,
> qryPurchaseOrderRpt.CategoryName, qryPurchaseOrderRpt.MainCatName,
> [EST_S-84a].LEBAEst_Cost, qryPurchaseOrderRpt.ExtendedPrice
> HAVING (((qryPurchaseOrderRpt.ProjectID) Like [What Project ID?
> Example:LEBA] & "*") AND (([EST_S-84a].LEBAEst_Cost) Is Not Null));
>

Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:32 AM
KARL DEWEY's Avatar KARL DEWEY
Guest
 
Posts: n/a
   
   
RE: STRUCTURE confused

>>First should the budget table have the (150 categories) as the fields or the
records?
NO! Do not use a separate field for each category but like how you listed
your bueget. Add a column for dates likes --
projID ActionDate Amount Category
ABCD 3/3/06 1000 260
ABCD 3/3/06 20 261
ABCD 3/3/06 20 262
ABCD 3/3/06 20 263
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12834
ABCD 3/3/06 20 264
ABCD 3/3/06 0 265
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12834
ABCD 3/3/06 20 266
ABCD 3/3/06 0 267
ABCD 3/3/06 20 268
Then for pay outs/expenses --
projID ActionDate Amount Category
ABCD 3/3/06 -100 260
ABCD 3/3/06 -5 261
ABCD 3/3/06 -5 262
ABCD 3/3/06 -5 263
ABCD 3/3/06 -5 264
ABCD 3/3/06 -5 266
ABCD 3/3/06 -5 268

Use a totals query to find the balance.

"lmv" wrote:

> I hope someone can understand my confusion:
> I have a report that I need to subtract the "budget" from the "used" for
> "Available"
> Because this is all in columns on excel I cannot figure out the structure
> for Access.
> First should the budget table have the (150 categories) as the fields or the
> records?
>
> Categories will not change what changes is the budget that goes into each
> category on each project.
>
> Example: Main category 260 is made up of categories 260-268
>
> Budget for projID ABCD is
> $1000 for cat 260
> $20 for cat 261
> $20 for cat 262
> $20 for cat 263
> $20 for cat 264
> 0 for cat 265
> $20 for cat 266
> 0 for cat 267
> $20 for cat 268
> ---------------------
> 260TTL = $1120
>
> I have used
> $100 for cat 260
> $5 for cat 261
> $5 for cat 262
> $5 for cat 263
> $5 for cat 264
> 0 for cat 265
> $5 for cat 266
> 0 for cat 267
> $5 for cat 268
>
> So I want the report to show all of that and then show what is still
> available in each category. The above is just an example of what I am trying
> to do. I don't know how to structure the budget table. I have tried both
> ways. With the category being the field name and the cat#s being the records
> and then the ABCDBudget being the fieldname and the amount added to the cat#
> record.
>
> Also tried cat#s are the field names and the record is ABCDBudget being the
> record.
>
> But I can't figure out how to total the 7 categories into the Main (260) to
> get a total and in general I am just confused. Please help!!
> Thanks!
>
> SELECT qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.OrderID,
> qryPurchaseOrderRpt.CategoryID, qryPurchaseOrderRpt.MainCatID,
> qryPurchaseOrderRpt.CategoryName, qryPurchaseOrderRpt.MainCatName,
> [EST_S-84a].LEBAEst_Cost, qryPurchaseOrderRpt.ExtendedPrice,
> CCur(Nz([LEBAEst_Cost]-[ExtendedPrice])) AS Available
> FROM [EST_S-84a] INNER JOIN qryPurchaseOrderRpt ON [EST_S-84a].Category =
> qryPurchaseOrderRpt.CategoryID
> GROUP BY qryPurchaseOrderRpt.ProjectID, qryPurchaseOrderRpt.OrderID,
> qryPurchaseOrderRpt.CategoryID, qryPurchaseOrderRpt.MainCatID,
> qryPurchaseOrderRpt.CategoryName, qryPurchaseOrderRpt.MainCatName,
> [EST_S-84a].LEBAEst_Cost, qryPurchaseOrderRpt.ExtendedPrice
> HAVING (((qryPurchaseOrderRpt.ProjectID) Like [What Project ID?
> Example:LEBA] & "*") AND (([EST_S-84a].LEBAEst_Cost) Is Not Null));
>

Reply With Quote
  #4 (permalink)  
Old 28-Jul-2006, 08:32 AM
lmv's Avatar lmv
Guest
 
Posts: n/a
   
   
Re: STRUCTURE confused

Ok I wil try this but could you explain what this does so I uderstand WHY it
works...

> MainCat: [Category]-[Category] Mod 10
> or...
> MainCat: Int([Category]/10)*10

Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12834

Thanks!
Reply With Quote
  #5 (permalink)  
Old 28-Jul-2006, 08:32 AM
Steve Schapel's Avatar Steve Schapel
Guest
 
Posts: n/a
   
   
Re: STRUCTURE confused

Lmv,

Sorry, I guess I have made an assumption here - perhaps the reality is
more complicated. But if your MainCat is 260 to cover Categories
260-268, and MainCat 270 covers categories 270-279 or whatever, then...
For [Category]=263 (for example)
[Category] Mod 10 (i.e. 263 Mod 10) = 3
so, [Category]-[Category] Mod 10 (i.e. 263-3) = 260
So whatever the Category, you can easily calculate its MainCat.

The other suggestion is similar...
For [Category]=263 (for example)
[Category]/10 (i.e. 263/10) = 26.3
Int(26.3) = 26
Int(26.3)*10 (i.e. 26*10) = 260

An even simpler way is...
MainCat: [Category]\10*10
( \ is an integer divisor, so 263\10 = 26 )

--
Steve Schapel, Microsoft Access MVP
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12834

lmv wrote:
> Ok I wil try this but could you explain what this does so I uderstand WHY it
> works...
>
>> MainCat: [Category]-[Category] Mod 10
>> or...
>> MainCat: Int([Category]/10)*10

>
> Thanks!

Reply With Quote
  #6 (permalink)  
Old 28-Jul-2006, 08:32 AM
Steve Schapel's Avatar Steve Schapel
Guest
 
Posts: n/a
   
   
Re: STRUCTURE confused

  Donate Today!  
Lmv,
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12834

WHen I indicated to put the 'Used' amount in your table, this is not
correct if you are recording each individual expense... then that will
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=12834
be in another table (ProjID, Category, Amount), and a query will be used
to summarise the Used amount for each Category.

--
Steve Schapel, Microsoft Access MVP

lmv wrote:
> Ok I wil try this but could you explain what this does so I uderstand WHY it
> works...
>
>> MainCat: [Category]-[Category] Mod 10
>> or...
>> MainCat: Int([Category]/10)*10

>
> Thanks!

Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Gurbani Jukebox
Listen to Gurbani while surfing SPN!
» Active Discussions
sikhism Who is "Mohan"?
Today 08:46 AM
22 Replies, 335 Views
sikhism How important is Matha...
Today 08:12 AM
59 Replies, 1,038 Views
sikhism need urgent advice.......
Today 06:46 AM
6 Replies, 81 Views
sikhism ਨਾਮਾ
Today 06:37 AM
2 Replies, 53 Views
sikhism Sikh Diamonds Video...
Today 04:23 AM
6 Replies, 116 Views
sikhism Are Creator and Creation...
Today 01:30 AM
44 Replies, 2,837 Views
sikhism Herman Hesse,...
Today 00:54 AM
13 Replies, 229 Views
sikhism On a Scale of Most...
Yesterday 21:42 PM
30 Replies, 1,277 Views
sikhism I became victim by...
Yesterday 19:50 PM
0 Replies, 44 Views
sikhism Sikh Books downloads
Yesterday 15:39 PM
2 Replies, 66 Views
sikhism Salok Sheikh Farid ji...
Yesterday 09:35 AM
0 Replies, 47 Views
sikhism In Punjab, three farmers...
Yesterday 05:36 AM
0 Replies, 49 Views
sikhism Supernatural Sikhs, what...
Yesterday 03:45 AM
19 Replies, 414 Views
sikhism Sukhmani Sahib Astpadi...
26-May-2012 22:57 PM
0 Replies, 51 Views
Do You Think You Are...
26-May-2012 09:59 AM
94 Replies, 8,258 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.2

All times are GMT +6.5. The time now is 09:14 AM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.54073 seconds with 30 queries