Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Handling lots of money (2000)

    With a currency field, I want to enter values such as 20, for it to then show

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Handling lots of money (2000)

    I suspect it may actually take some code - how do you go about putting in amounts less than 1 million? You may want to use an unbound field to collect the data entered as text, and then parse it and validate it using VBA before putting it into the actual currency field.
    Wendell

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Handling lots of money (2000)

    I need to avoid using code, perhaps I could use a macro to multiply the amount entered? If I needed to key half a mill., I would enter 0.5.

  4. #4
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Handling lots of money (2000)

    Andrew

    A simple line of code behind the text:

    <pre>Private Sub Amount_AfterUpdate()

    Me.Amount = Me.Amount * 1000000

    End Sub</pre>


    I know you didn't want to use code but by far the simplest way.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Handling lots of money (2000)

    What about storing 0.5 in the field, and using a query to multiply the field with 1,000,000 for calculations? No code involved.

  6. #6
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Handling lots of money (2000)

    That's fine. In terms of a MACRO I would use the SetValue Action. Why does everyone hate macros? I teach Access and you have to teach Macros as part of the course(s). You can achieve an awful lot with them, without learning a programming language.

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Handling lots of money (2000)

    Macros can be useful in some situations, but in general they are harder to maintain and debug than VBA code.

    You have to be careful with this, whether you use a macro or VBA:
    - User enters 0.5.
    - After Update changes value to 500,000.
    - User edits 500,000 and changes it to 400,000.
    - After Update changes value to 400,000,000,000 <img src=/S/yikes.gif border=0 alt=yikes width=15 height=15>

  8. #8
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Handling lots of money (2000)

    I'd like that in my bank account !! <img src=/S/bananas.gif border=0 alt=bananas width=33 height=35>

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Handling lots of money (2000)

    It only takes one line of code <img src=/S/rofl.gif border=0 alt=rofl width=15 height=15>

  10. #10
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Handling lots of money (2000)

    Writing good complex macros is just as much work as writing code but without the flexibility and error handling of code. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

  11. #11
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Handling lots of money (2000)

    Yes but.. If you're providing two days Advanced Access training you can't ignore Macros OR teach VBA. Therefore, people will continue to need/use macros. So how could Microsoft contemplate removing Macros from future versions?!

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Handling lots of money (2000)

    Perhaps it is an illusion to want to teach Advanced Access in two days. Once you get beyond the basics, Access is a complex developer tool.

    Many of the people posting replies in this forum are developers; they are familiar with Access VBA, so they tend to provide solutions involving VBA.

  13. #13
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Handling lots of money (2000)

    Andrew

    I've been messing about with Access for about 3 years or so now.
    I looked at Macro's and didn't like them.
    My only macros are AutoExec & AutoKeys.
    I much prefer to write my own code, and feel far more satisfied when done so.

    I wouldn't call myself a developer or a programmer, I'm not Industry trained or anything of the professional sort,
    but anticipate a two day advanced training course would be extremely difficult to cover the advanced capabilities of
    Access.

    But, if your training criteria specifies macro's as part of the course, then so be it.

  14. #14
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Handling lots of money (2000)

    just my <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15> -- if you've managed to do useful things with macros (and I would be impressed!) you'll undoubtedly find it worthwhile to learn and use VBA. The knowledge, besides making life a *lot* easier when handling Access problems, is extensible to programming in Excel and Word as well as picking up similar programming enviornments such as ASP for implementing web-based solutions.

    Again -- if you've suffered with macros and are reasonably proficient at making them do things even a little complex, try VBA and you'll wonder why you were working in a shoebox with macros! <img src=/S/beep.gif border=0 alt=beep width=15 height=15>

  15. #15
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Handling lots of money (2000)

    The same way they contemplated changing the VBE to the same one shared by the other MS apps and the same way they contemplated switching from Access Basic to VBA. If your application supports a Sub Main(), then you don't need an autoexec macro any more. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

    Teach your users the basics of conditional execution and branching in macros and let it go at that. That is certainly complex enough for a two-day (or even longer) training session where code can't be taught.
    Charlotte

Page 1 of 2 12 LastLast

Posting Permissions

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