Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
it has always worked for me, written the same way. But won't under this code.

Private Sub PayBy_PaidByOther(ByVal type As String, ByVal Actnum As String) Handles PayBy.PaidByOther
      Select Case type
          Case "CC"
              BSvchrs.Current!CHECKNUM = Actnum
              BSvchrs.Current!STATUS = "PAID"
          Case "EFT"
      End Select
      dgVchrMast.Refresh()
      dgVchrMast.EndEdit()
      CMD.CommandText = SQvchrmast
      DA.SelectCommand = CMD
      CmdBldr.DataAdapter = DA
      CmdBldr.RefreshSchema()
      Try
          DA.Update(DS.Tables("vchrmast"))
          DS.Tables("vchrmast").AcceptChanges()
      Catch
          Debug.Print("ERROR")
      End Try

  End Sub


What I have tried:

nothing. Because the same code works in other areas.
Posted
Updated 28-Feb-21 9:40am
Comments
Maciej Los 28-Feb-21 12:20pm    
Replace this:
      Catch
          Debug.Print("ERROR")
      End Try

with
      Catch Ex As Exception
          Debug.Print(Ex.Message)
      End Try

to find out what's the reason...
dpowning 28-Feb-21 14:06pm    
Trouble is its not throwing an error.

1 solution

Solution was to add
BSvchrs.EndEdit()
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900