Results 1 to 4 of 4
  1. #1
    Wabamdo is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    May 2015
    Posts
    13

    How to change course cost without affecting the values of the previous students

    Hi guys,I am developing a school database system fees module in Microsoft access,how will i be able to set up my tables such that i will be able to change courses cost without affecting earlier records that depended on the COST field in the courses table.


    Thank you in advance.

  2. #2
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    I just did a bit of looking and came across this:
    Code:
    
    Private Sub txtSaleDate_AfterUpdate()
    If IsDate(Me!txtSaleDate) Then ' see if user entered a date
      If IsNull(Me!txtDeliveryDate) Then ' don't stomp on existing data
       Me!txtDeliveryDate = DateAdd("d", 14, Me!txtSaleDate)
      End If
    End If
    End Sub
    I'm sure this can be adapted for your needs.

    Early dates = old value
    dates after x = new value

    not an exact answer but it might help you make some progress.

  3. #3
    LaughingBull is offline Competent Performer
    Windows 8 Access 2003
    Join Date
    Jul 2015
    Location
    Toledo Ohio
    Posts
    143
    Private Sub CurrencyCourseCost_AfterUpdate()
    Select Case CurrencyCourseCost
    Case x = Me!CurrencyCourseCost 'this makes x = to the existing course cost
    Case x = x + [Enter raise in Course Cost] ' this should give you a prompt
    to enter the rise in course cost and add it to the existing cost for new cost

    End Select

    End Sub

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850

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

Similar Threads

  1. Replies: 7
    Last Post: 01-12-2015, 03:47 PM
  2. Recall previous values on a form
    By Thermalmonster in forum Programming
    Replies: 12
    Last Post: 07-28-2014, 01:54 PM
  3. Replies: 1
    Last Post: 04-09-2012, 02:14 PM
  4. Replies: 1
    Last Post: 05-25-2011, 08:37 AM
  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