Results 1 to 6 of 6
  1. #1
    octsim is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    15

    Convert unit on data entry

    Hello there,

    I have a simple question about data entry and performing some mathematical operations before storing the entered data.
    I have a data entry form where I want the users to put in some values but I want to perform a unit conversion before storing the data. Is that possible? If yes - can you guys point me in the right direction?



    Thanks in advance!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    octsim is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    15
    Thanks, yes basically like that but I don't think it will work for what I want to do.
    From what I understand, it's better to just use a query to update values in my tables.
    The method explained for Access 2010 would be perfect but that would mean I have to create an additional field for each field I want to convert.
    I have 12 fields in my table that the user will enter in mAh - I just want Access to store it directly in Ah (*1000). I have thought about running a query every time after I store data but I don't think I can create a query which just updates values I have just entered and it will multiply all other values with 1000 as well.
    If creating 12 additional fields as calculated fields is the only way, I'll do that but I thought there might be a more "elegant" way to do this.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    How about code in the after update event of each control that changes the value entered?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    octsim is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    15
    Thanks, that's exactly what I was looking for!

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. how to copy last entry data for new entry
    By alexandervj in forum Access
    Replies: 7
    Last Post: 11-13-2013, 02:57 PM
  2. Combobox Search Changing Unit #'s
    By leamas in forum Forms
    Replies: 3
    Last Post: 06-22-2012, 04:30 PM
  3. Convert a crosstab set of data to a flat list
    By jamesrees02 in forum Queries
    Replies: 3
    Last Post: 02-17-2012, 06:36 PM
  4. Need help to convert data.
    By Karan in forum Access
    Replies: 2
    Last Post: 04-30-2011, 12:35 PM
  5. Unit of Measure
    By Lghtning4u in forum Forms
    Replies: 0
    Last Post: 07-25-2007, 04:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums