Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Oct 2001
    Location
    New York
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Overwriting a field? (Access 97 SR1)

    I need to create a field in my database called settlement amount. The user would like the amount to show the amount from a field entitled ScheduledAmt, however, sometimes the settlement amount might be different, and he would like to be able to overwrite that amount if it does not equal ScheduledAmt. How do I do that?

    Thanks
    Nadia

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Overwriting a field? (Access 97 SR1)

    You need to have both fields in the table.
    Then on the form where the data entry is taking place, write an after update event for the ScheduledAmt field.

    if isNull(me!settlementamount) then
    me!settlementamount = me!ScheduledAmt
    end if
    What will happen is that the moment anything is entered into Scheduledamt the same figure will appear in settlement amt, but you can then overwrite it if you wish.
    The reason for the if isNull( ) stuff is so that if you subsequently change the scheduleamt, it doesn't overwrite again. I don't know if you really want or need this bit.
    Regards
    John



Posting Permissions

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