Results 1 to 5 of 5
  1. #1
    htjr is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    3

    Help with carrying over values


    I am new to Access. I now own Access 2010. I am trying to make a form to keep track of fuel mileage for my semi truck. It's for IFTA. I made a table in access that works ok. The two fields of concern are Odometer begin, and Odometer End. I was wondering if there is a way to carry over the value in Odometer End, to have it automatically entered in Odometer Begin field of the next record so I don't have to type it in every time I start a new record? Example; Record 1: Date: 1/1/2012, Odometer Begin: 1,084,241, Odometer End: 1,084,441. Record 2: Date 1/2/2012, Odmeter Begin: 1,084,441. I have to type the ending mileage from the previous record into the begining mileage of the present record everytime.

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    If you use a Data Entry Form to enter your data, you can put VBA code into your Form Load event or behind a 'New Record' Button that searches for the highest Odometer Reading in the Table and puts it into the Odometer Begin Text Box on the Form and then sets the focus on the Odometer End Text Box on the Form to let you enter the new reading.

  3. #3
    htjr is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    3
    Thank you for replying so quickly Robeen. I have no idea at all, what-so-ever on using Visual Basic. I do have a data entry form with a new record button in place.

  4. #4
    burgerpj is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Location
    Stellenbosch, South Africa
    Posts
    8

    Smile Solution _ Default Values with VBA

    Here is a solution.... enjoy! It makes the last value of ODO_END the default value for ODO_BEGIN. See the Word Document attached with detailed steps.

  5. #5
    htjr is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2012
    Posts
    3
    Thank you both so much for the fast help. Everything works great. Thank you again!!

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

Similar Threads

  1. Carrying data throughout Navigation Forms
    By drrob1983 in forum Forms
    Replies: 2
    Last Post: 09-06-2011, 12:57 AM
  2. Replies: 0
    Last Post: 07-26-2011, 02:03 PM
  3. Carrying over sort to report
    By eww in forum Programming
    Replies: 2
    Last Post: 03-04-2011, 03:39 PM
  4. Replies: 3
    Last Post: 04-04-2010, 05:26 PM
  5. Replies: 1
    Last Post: 03-27-2010, 06:13 AM

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