Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004

    Unanswered: Extra record row added to datasheet - how to delete?

    I have a problem with subform fields in datasheet view. As in the diagram below, I have an expression set
    so that when the Paid field (yes/no) is set to Yes, the OverdueCharge field is set to $0.00 (using an IIf statement) and
    when the Paid field is set to No, the OverdueCharge field is set to $2.00. This works fine, except that an extra
    record is always automatically added to the bottom of the form by the program. Because there is no data in the paid field of this record, the IIf statement considers its value as No (false) and
    so the "extra" record displays the OverdueCharge field as $2.00, thus affecting the TotalCost field, which is set to
    =Sum([Quantity]*[CostPerUnit])+[OverdueCharge]. What to do? This is really annoying and obviously in a practical situation
    would give misleading transaction information to clients.
    Attached Thumbnails Attached Thumbnails submission.gif  

  2. #2
    Join Date
    Dec 2002
    Glasgow, UK
    if you set "Allow Additions = no" on the form properties of the datasheet it will remove the "extra" record - but if you are using the datasheet to input data then this is not the solution.
    Access XP & WinXP Pro

  3. #3
    Join Date
    Feb 2004
    One Flump in One Place
    You could extend your expression to not only test if the Paid field is false, but that say the cost field is not null also

    e.g iif([paid] = false and [cost] is not null, .....)
    pootle flump
    ur codings are working excelent.

Posting Permissions

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