I
Irene
i have a form. actually it is work well before i'm adding some code. the code
is i'm copy from the http://www.allenbrowne.com/AppAuditCode.html cos i'm
want to trace who have been edit the form. after i'm adding the code, and
when i'm choosing the part from the combo box, it was coming out this error
msg, 3061 Too few parameters, expected 1. can anybody help me solve this
problem? below is my code in this form. due to i'm not so familiar with the
code, hope somebody help me solve this problem.
Option Compare Database
Dim bWasNewRecord As Boolean
Private Sub Form_AfterDelConfirm(Status As Integer)
Call AuditDelEnd("audTmpTS_tmp", "audTS_tmp", Status)
End Sub
Private Sub Form_AfterUpdate()
Call AuditEditEnd("t_time_sheet_temp", "audTmpTS_tmp", "audTS_tmp", "ts_ID",
Nz(Me!ts_tmp_ID, 0), bWasNewRecord)
End Sub
Private Sub Form_BeforeUpdate(Cancel As Integer)
bWasNewRecord = Me.NewRecord
Call AuditEditBegin("t_time_sheet_temp", "audTmpTS_tmp", "ts_ID",
Nz(Me.ts_tmp_ID, 0), bWasNewRecord)
End Sub
Private Sub Form_Delete(Cancel As Integer)
Call AuditDelBegin("t_time_sheet_temp", "audTmpTS_tmp", "ts_tmp_ID",
Nz(Me.ts_tmp_ID, 0))
End Sub
Private Sub bttn_sub_con_Click()
On Error GoTo Err_bttn_sub_con_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "f_time_sheet_for_sub_con"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_bttn_sub_con_Click:
Exit Sub
Err_bttn_sub_con_Click:
MsgBox Err.description
Resume Exit_bttn_sub_con_Click
End Sub
Private Sub bttn_update_Click()
On Error GoTo bttn_update_Click_Err
DoCmd.SetWarnings False
DoCmd.Requery ""
DoCmd.OpenQuery "qa_ts_daily_in_qty", acViewNormal, acEdit
DoCmd.OpenQuery "qa_ts_to_lot_prod_qty_daily", acViewNormal, acEdit
DoCmd.OpenQuery "qu_minus_stk_sp", acViewNormal, acEdit
DoCmd.OpenQuery "qu_ts_packing_qty_2_qty", acViewNormal, acEdit
DoCmd.OpenQuery "qu_ts_in_qty_to_lot_total_qty", acViewNormal, acEdit
DoCmd.OpenQuery "qa_ts_temp_to_t_ts", acViewNormal, acEdit
DoCmd.OpenQuery "qd_ts_temp", acViewNormal, acEdit
DoCmd.Requery ""
DoCmd.SetWarnings True
bttn_update_Click_Exit:
Exit Sub
bttn_update_Click_Err:
MsgBox Error$
Resume bttn_update_Click_Exit
End Sub
Private Sub PART_CODE_AfterUpdate()
On Error GoTo PART_CODE_Err
DoCmd.Requery ""
DoCmd.GoToRecord , "", acLast
DoCmd.GoToControl "date"
PART_CODE_Exit:
Exit Sub
PART_CODE_Err:
MsgBox Error$
Resume PART_CODE_Exit
End Sub
thanks!
is i'm copy from the http://www.allenbrowne.com/AppAuditCode.html cos i'm
want to trace who have been edit the form. after i'm adding the code, and
when i'm choosing the part from the combo box, it was coming out this error
msg, 3061 Too few parameters, expected 1. can anybody help me solve this
problem? below is my code in this form. due to i'm not so familiar with the
code, hope somebody help me solve this problem.
Option Compare Database
Dim bWasNewRecord As Boolean
Private Sub Form_AfterDelConfirm(Status As Integer)
Call AuditDelEnd("audTmpTS_tmp", "audTS_tmp", Status)
End Sub
Private Sub Form_AfterUpdate()
Call AuditEditEnd("t_time_sheet_temp", "audTmpTS_tmp", "audTS_tmp", "ts_ID",
Nz(Me!ts_tmp_ID, 0), bWasNewRecord)
End Sub
Private Sub Form_BeforeUpdate(Cancel As Integer)
bWasNewRecord = Me.NewRecord
Call AuditEditBegin("t_time_sheet_temp", "audTmpTS_tmp", "ts_ID",
Nz(Me.ts_tmp_ID, 0), bWasNewRecord)
End Sub
Private Sub Form_Delete(Cancel As Integer)
Call AuditDelBegin("t_time_sheet_temp", "audTmpTS_tmp", "ts_tmp_ID",
Nz(Me.ts_tmp_ID, 0))
End Sub
Private Sub bttn_sub_con_Click()
On Error GoTo Err_bttn_sub_con_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "f_time_sheet_for_sub_con"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_bttn_sub_con_Click:
Exit Sub
Err_bttn_sub_con_Click:
MsgBox Err.description
Resume Exit_bttn_sub_con_Click
End Sub
Private Sub bttn_update_Click()
On Error GoTo bttn_update_Click_Err
DoCmd.SetWarnings False
DoCmd.Requery ""
DoCmd.OpenQuery "qa_ts_daily_in_qty", acViewNormal, acEdit
DoCmd.OpenQuery "qa_ts_to_lot_prod_qty_daily", acViewNormal, acEdit
DoCmd.OpenQuery "qu_minus_stk_sp", acViewNormal, acEdit
DoCmd.OpenQuery "qu_ts_packing_qty_2_qty", acViewNormal, acEdit
DoCmd.OpenQuery "qu_ts_in_qty_to_lot_total_qty", acViewNormal, acEdit
DoCmd.OpenQuery "qa_ts_temp_to_t_ts", acViewNormal, acEdit
DoCmd.OpenQuery "qd_ts_temp", acViewNormal, acEdit
DoCmd.Requery ""
DoCmd.SetWarnings True
bttn_update_Click_Exit:
Exit Sub
bttn_update_Click_Err:
MsgBox Error$
Resume bttn_update_Click_Exit
End Sub
Private Sub PART_CODE_AfterUpdate()
On Error GoTo PART_CODE_Err
DoCmd.Requery ""
DoCmd.GoToRecord , "", acLast
DoCmd.GoToControl "date"
PART_CODE_Exit:
Exit Sub
PART_CODE_Err:
MsgBox Error$
Resume PART_CODE_Exit
End Sub
thanks!