theinviter
Registered User.
- Local time
- Today, 08:07
- Joined
- Aug 14, 2014
- Messages
- 244
hi Guys
need help
i have a form and subform , when user click on button then record in form will paste in subform but have issue if the ID is null then paste immediately or if ID not null then go to new record.
i tried this code but dose not work
Private Sub Command1608_Click()
On Error GoTo new_Err
Me.[cycle subform].SetFocus 'sets the focus to sfrm_Each_Book_subform
If ID <> Null Then
DoCmd.RunCommand acCmdRecordsGoToNew
Me.[cycle subform].Form.Cycle1 = Me.No_of_Cycle.Value
Me.[cycle subform].Form.date_ = Date
MsgBox "Update succefully "
Else
Me.[cycle subform].Form.Cycle1 = Me.No_of_Cycle.Value
Me.[cycle subform].Form.date_ = Date
End If
new_Err:
End Sub
need help
i have a form and subform , when user click on button then record in form will paste in subform but have issue if the ID is null then paste immediately or if ID not null then go to new record.
i tried this code but dose not work
Private Sub Command1608_Click()
On Error GoTo new_Err
Me.[cycle subform].SetFocus 'sets the focus to sfrm_Each_Book_subform
If ID <> Null Then
DoCmd.RunCommand acCmdRecordsGoToNew
Me.[cycle subform].Form.Cycle1 = Me.No_of_Cycle.Value
Me.[cycle subform].Form.date_ = Date
MsgBox "Update succefully "
Else
Me.[cycle subform].Form.Cycle1 = Me.No_of_Cycle.Value
Me.[cycle subform].Form.date_ = Date
End If
new_Err:
End Sub