Ask Experts Questions for FREE Help !
Ask
    Srecak's Avatar
    Srecak Posts: 11, Reputation: 1
    New Member
     
    #1

    Apr 26, 2006, 02:09 AM
    Forms in access
    :)
    This is probably fairly simple, but I don't really know Access as much as I'd like to!
    I have a form in which I write in the number of items sold in a day:
    PU D; PU P; PU T - are just some of them. At the bottom of the form, there should be a field which shows the total, merely as a sort of 'control' point. I have tried to put a 'sum' formula as a default value in an unbound field on the Form, but I don't get anything that would give me a sum whilst keying in numbers. Any suggestions on how I should do this?

    Many thanks,
    S
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #2

    Apr 26, 2006, 06:24 AM
    I would need to know more about your table structure to answer this. I don't understand what you mean by PU D; PU P; PU T.

    If you are recording item sales, your table should look something like this:

    RecordID (PK Autonumber)
    ItemID (FK)
    SalesDate
    SalesQty

    You could then use a DSUM to calculate the total for a date.
    Srecak's Avatar
    Srecak Posts: 11, Reputation: 1
    New Member
     
    #3

    Apr 26, 2006, 06:37 AM
    Hi!

    The structure is very simple. There is a recordID (PK autonumber), the itemID shows each item seperately: hence the PU D(document), PU P(parcel) and PU T (transit) which are three different items. Then there's the PU Total which could be Yr 'sales qty' which at the moment I am manually adding each sales item and logging this number into this field. Instead of that, I would like the 'total' to add it's self up automatically, if possible. DSUM?

    Hope this clearifies Yr questions...

    Srecak
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #4

    Apr 26, 2006, 06:49 AM
    Actually it doesn't. Can you list the fields? You should not be storing a total. Calculations can be done anytime and shouldn't be stored.

    If you want, you can make a copy of your database, zip it and attach it here and I'll take a look.
    Srecak's Avatar
    Srecak Posts: 11, Reputation: 1
    New Member
     
    #5

    Apr 26, 2006, 10:49 PM
    Hmm, it seems I'm dumber than I thought:D
    Attached is the database itself. Please give me a hand!
    Also what would be a good book on MS Access?

    Thanks
    Srecak
    Attached Files
  1. File Type: zip SLS.zip (21.9 KB, 58 views)
  2. ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #6

    Apr 27, 2006, 05:27 AM
    Its not a matter of dumber. It's a matter that database design is an art that has some very specific rules that should be adhered to to create an efficient design. The rules aren't hard to learn, but they need to be learned.

    You need to redesign your database along the lines I've already suggested. Here are some things you need to change.

    1) Do not use spaces (or non alpha characters) in object names. This will come back to haunt you. This article lists some of the common naming conventions:
    General: Commonly used naming conventions

    2) Do not use multiple Primary keys. This will cause you no end of problems when creating queries. Use an autonumber PK for all tables. Do not use text fields for PKs, they index more slowly so inhibit performance in joins

    3) Do not use fields to describe values, use records instead. You have a fields for your items (PU D, P, T). Look at the table strucutre I suggested. You should have a field for Item so that each item is a record.

    4) Don't store calculated values. You can perform your calcs on the fly and that insures the most accurate numbers.

    5) Date is a reserved word in Access and should not be used as an object name.

    Again, go back to my previous response which gave you the info you needed. Add an ITEM table, change the tables as indicated. Lookup DSum in Access help.

    As for books, I use the Sybex Developer's Handbook. But that is a bit more advanced. If you need something basic the Dummies book is pretty good.
    Srecak's Avatar
    Srecak Posts: 11, Reputation: 1
    New Member
     
    #7

    Apr 27, 2006, 05:47 AM
    Scott!
    This is great! I shall put this into practice straight away, and send You updated version when I'm done.
    Many thanks and I've also ordered the book,
    Srecak
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #8

    Apr 27, 2006, 05:51 AM
    I'll be here, glad to assist

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Two w2 forms? [ 2 Answers ]

Hello I changed status from F1 to H1b (h1b started oct 2005) and I know now that I can file 1040NREZ and 8843. I received a W2 from my university for one pay check that I got in January 2005 and I have a w2 from my current employer as well for the paychecks during rest of 2005. How do I...

Forms [ 1 Answers ]

I'm a student with an F1 visa in Mass. And was wondering which forms I need to fill. I work as a teaching fellow in my university.

H1B - 2 W2 forms. [ 3 Answers ]

I changed my job in October 2005 and received W2 from both, my new as well as old employer. I have been in US for more than 2 years now and as per the definition of "Resident" based on "Presence Test" I qualify to be a resident of USA. My question is, filing my tax return will be as simple as going...

No W2 forms [ 2 Answers ]

Does anyone know how I can file a state tax return without w2 forms I sent a 4506 form to IRS requesting copies. They sent my check back and said this info was unavailable due to 7 years had past and they no longer have these records. I lost all personal papers in a tornado. I can't remember all...

What forms [ 3 Answers ]

I entered USA on F1 in Aug 2001. 2005 Aug I changed to H1B from F1 (OPT). What tax forms do I need to file for 2005 year?


View more questions Search