SirStevie3
Registered User.
- Local time
- Today, 14:14
- Joined
- Jul 29, 2013
- Messages
- 58
I have a command button that basically saves the record that i just finished entering. here's the code:
honestly i dont know what it is doing exactly... i copied and pasted from the internet somewhere.
what i'd like to do now is add a second function that will make all the controls on the form go to null after the record is saved. so the user can start from scratch and add another record.
i tried adding me.refresh right before "end sub" but that didnt work.
i tried adding "me.controlname.value = null" for every control on the form, and that didnt work either.
i also tried adding this code that i found on bytes.com:
that didnt work either.
anyone have any suggestions? peas and carrots!
Private Sub cmdAddAnother_Click()
On Error GoTo Err_cmdAddAnother_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Exit_cmdAddAnother_Click:
Exit Sub
Err_cmdAddAnother_Click:
MsgBox Err.Description
Resume Exit_cmdAddAnother_Click
End Sub
honestly i dont know what it is doing exactly... i copied and pasted from the internet somewhere.
what i'd like to do now is add a second function that will make all the controls on the form go to null after the record is saved. so the user can start from scratch and add another record.
i tried adding me.refresh right before "end sub" but that didnt work.
i tried adding "me.controlname.value = null" for every control on the form, and that didnt work either.
i also tried adding this code that i found on bytes.com:
On Error Resume Next
Dim ctl As Control
For Each ctl In Me.Controls
ctl.Value = Null
Next
that didnt work either.
anyone have any suggestions? peas and carrots!