Results 1 to 12 of 12

Thread: Decimal Format

  1. #1
    Join Date
    May 2006
    Posts
    5

    Wink Unanswered: Decimal Format

    Hi Guys, how can i format my number or currency field to display decimal points such as 2034.56 instead of just rounding it off to 2035 or 2035.00?

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Is the field a currency datatype or are you formatting it to be currency in your report/form?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    May 2006
    Posts
    5
    The field is a Number datatype

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    it might be byte, integer, longinteger, single, double, currency, or decimal, but it certainly is not "number".

    if you selected number in table design and did nothing else: you have a longinteger which by definition has no data after the decimal.

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372
    Data Type can be a NUMBER.
    Put Field Size DOUBLE.

  6. #6
    Join Date
    May 2006
    Posts
    5
    ...and that solved the problem! Thanks MStef-ZG and others.

    can yu help with a code behind an Access form to test username and password strings and give access or deny enterance to an application.

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    i know, i'm a pedantic old bastard, but there really REALLY is no Access datatype 'number'.

    i am not responsible for the incoherence of Access' table-design "wizards".

    izy
    currently using SS 2008R2

  8. #8
    Join Date
    May 2006
    Posts
    5

    Angry Multiple User Access control in a payroll apps

    I am working on a payroll application using Microsoft Access 2002. I need codes to manage multiple user access (i.e. request username and password) to the application. So far i have been able to generate payroll for a single month (by inserting appropriate formular in my query). How can I generate for consequent months and save the data in the database. Any contribution towards the success of the PAYROLL will be highly appreciated. Expecting your replies.

  9. #9
    Join Date
    Apr 2006
    Location
    Huddersfield, UK
    Posts
    154
    there are some useful multi user templates that handle username and passwords, try http://www.databasedev.co.uk there is a free d/l'able sample there, and there is scope to have it multi menu and multi access. If you need that pm me and i'll dig a template out for you.

    Dan
    sometimes simple is best.... and i'm just a simple fellow.

  10. #10
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by izyrider
    i know, i'm a pedantic old bastard
    That's the curse of the developer Izy - we all are

    Now - where oh where is your lecture on floating point imprecision? I really thought you were building up to it.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  11. #11
    Join Date
    May 2006
    Posts
    5

    Red face Appending data to a table: Pls Help

    Presently workin on a payroll apps. I have successfully printed a demo payslip for the first month. How can I generate and print payslip for consequent months and append the data to the same table. I am using Access 2002. The first month payroll was generated using a query. Expect to hear from u.

  12. #12
    Join Date
    Apr 2006
    Location
    Huddersfield, UK
    Posts
    154

    Talking

    Quote Originally Posted by mofemi
    How can I generate and print payslip for consequent months and append the data to the same table.
    I'm not sure how your payroll software is configured, but what i would do would be to use the query you already have to print out for that month...

    I'm presuming in the criteria section of the query you have set the criteria such as [Month]="january" and [Employee]="Bob Smith"??

    If this is the case, what i would do is create a new table and name it tbl_criteria.

    add in a lookup field, call this month, and add in each month into the lookup, so your lookup would be something like, "January";"february" and so on..

    add in another field, called employee, and again, use the lookup wizard to gather the data form your "employees" table. When it asks which fields you'd like to use I personally would only select "first name" and "surname".

    Ok, thats that table done.

    With your query for payroll, get shut of the criteria you previously set (as this is now going to be managed by the table we just created) and add in the new table "tbl_criteria". Link the fields "Month" to the month in the payroll, and Employee (if it doesn't already have a link established) to Employee.

    {{to create a link in a query, just drag one field from one table, to the field you want to link it to in the other - a line will be displayed showing the link}}

    You may notice that your query has no results, this is fine.

    Ok.. thats the backend sorted.

    Create a new form... call it "search" or something similar.
    bind the new form to tbl_criteria (form properties > data source > tbl_criteria)
    add in the two fields we have selected.

    create a macro, that closes this form and opens the report (payslips) {{when a form is closed the new data is saved}}

    Go back to the original form, and add in a button to run this new macro.

    open the new form, select a month, and select an employee from the drop down boxes, click the button, and et voila, the payslip for that month, and that employee should be displayed.

    If you just want it for months rather than by employee also, just go back to the table, and remove the employee field, remove it in the query, and then again in the form. Doing this would show ALL payslips for ALL employees in a given month, as set by the user.
    sometimes simple is best.... and i'm just a simple fellow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •