Edit currentrecord without effecting the rest of the colum/row

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Eidblub
    New Member
    • Jun 2014
    • 3

    Edit currentrecord without effecting the rest of the colum/row

    I have a this code

    Set rst = db.OpenRecordse t("select raad from blub where arnr = " & arnr & " ", dbOpenDynaset)

    eid = rst!raad - a(is a number)

    If eid <= 0 Then
    MsgBox "Het raad: " & rst!raad

    Else

    Me.Total.Value =
    Me.verprice.Val ue * Me.a.Value

    End If

    When I can the value of total, it changes for every row. I want only the current record of total to be effected. I looked here around and on google. I did found few great things but I couldn't get it working for me after like 4 hours of search and trail. Hopefully you kind people can save me! Thank you
  • jimatqsi
    Moderator Top Contributor
    • Oct 2006
    • 1288

    #2
    The text box is changing for every row because it is not bound to any data item. In a continuous form it is not possible to have an unbound text box in the detail that does not behave like that.

    Jim

    Comment

    • Eidblub
      New Member
      • Jun 2014
      • 3

      #3
      I did fix it, but later I deleted the whole code by accident because I thought that was the non working code and I found it out too late. was something like that u had to add.


      =[Test] & " ," & " Record " & [CurrentRecord] & " of " & IIf([NewRecord];[CurrentRecord];Count([Test]))

      Comment

      • Eidblub
        New Member
        • Jun 2014
        • 3

        #4
        The solution which is freaking way easier is to use the following in the source code part

        =[First field]*[second field]

        this effects the current row without effecting the others

        Comment

        • jimatqsi
          Moderator Top Contributor
          • Oct 2006
          • 1288

          #5
          Glad you could work through it to a successful end.

          Comment

          Working...