Hello,
I usually use Laptop A to write my code and my code is working. But when I run the code on another laptop (Laptop B), the code is not working. The code is so simple :
DoCmd.RunCommand acCmdSaveRecord
Dim TSQL As String
Dim TSQL1 As String
TSQL = "INSERT INTO T_PENJ_UMUM " & _
" ([NO_T_TRANS],[NO_TRANS_JU],[GRUP],[HARGA_PCS],[PPN],[DISKN_PRSN],[DISKN_RP],[TUSLAH],[BULAT],[PEMBELI]) " & _
" VALUES ('" & NO_BARU & "','" & NO_TRANS_JU & "','" & GRUP_OBAT & "','" & HARGA_PCS & "','" & PPN & "','" & DISKN_PRSN & "','" & DISKN_RP & "','" & TUSLAH & "','" & BULAT & "','" & PEMBELI & "')"
pesan = MsgBox(TSQL, vbInformation)
TSQL1 = "INSERT INTO T_TRANS_LOG_USER " & _
" ([STREMPNAME],[NO_T_TRANS],[NO_TRANS_JU]) " & _
"VALUES ('" & lstrEmpName.Caption & "','" & NO & "','" & NO_TRANS_JU & "')"
DoCmd.RunSQL TSQL
DoCmd.RunSQL TSQL1
pesan = MsgBox("PROSES INPUT BERHASIL", vbInformation, "Informasi")
DoCmd.GoToRecord , , acNewRec
My problem is, DoCmd.GoToRecord , , acNewRec is not working on Laptop B sometime (it throws 2105 "You can't go to the specified record") but it always works on Laptop A.
Could anyone explain why i might be getting this error?
Thanks
I usually use Laptop A to write my code and my code is working. But when I run the code on another laptop (Laptop B), the code is not working. The code is so simple :
DoCmd.RunCommand acCmdSaveRecord
Dim TSQL As String
Dim TSQL1 As String
TSQL = "INSERT INTO T_PENJ_UMUM " & _
" ([NO_T_TRANS],[NO_TRANS_JU],[GRUP],[HARGA_PCS],[PPN],[DISKN_PRSN],[DISKN_RP],[TUSLAH],[BULAT],[PEMBELI]) " & _
" VALUES ('" & NO_BARU & "','" & NO_TRANS_JU & "','" & GRUP_OBAT & "','" & HARGA_PCS & "','" & PPN & "','" & DISKN_PRSN & "','" & DISKN_RP & "','" & TUSLAH & "','" & BULAT & "','" & PEMBELI & "')"
pesan = MsgBox(TSQL, vbInformation)
TSQL1 = "INSERT INTO T_TRANS_LOG_USER " & _
" ([STREMPNAME],[NO_T_TRANS],[NO_TRANS_JU]) " & _
"VALUES ('" & lstrEmpName.Caption & "','" & NO & "','" & NO_TRANS_JU & "')"
DoCmd.RunSQL TSQL
DoCmd.RunSQL TSQL1
pesan = MsgBox("PROSES INPUT BERHASIL", vbInformation, "Informasi")
DoCmd.GoToRecord , , acNewRec
My problem is, DoCmd.GoToRecord , , acNewRec is not working on Laptop B sometime (it throws 2105 "You can't go to the specified record") but it always works on Laptop A.
Could anyone explain why i might be getting this error?
Thanks