violentjay25
Registered User.
- Local time
- Today, 17:11
- Joined
- Feb 22, 2005
- Messages
- 30
I would like to know how to get some kind of error handling that make sense to the user. On this form there are 3 boxes. I would like to have something state "hey you did not fill out txtMemo1" and I would also like to make sure people enter the date in the correct format. Access already gives you and error when you enter a date that does not match the tables specs. But I need a user friendly box not the one acces provides. Please help me with some code and were to place it in this code
Private Sub cmdUpdate_Click()
DoCmd.SetWarnings False 'Before
DoCmd.RunSQL "Insert into tbl_Updates (Date1, Memo1, ProjectName) " & _
"Values (#" & Me.txtDate1 & "#, '" & _
Me.txtMemo1 & "', '" & _
Me.cboProjectName & "')"
DoCmd.SetWarnings True 'After
Me.cboProjectName = ""
Me.txtDate1 = ""
Me.txtMemo1 = ""
Private Sub cmdUpdate_Click()
DoCmd.SetWarnings False 'Before
DoCmd.RunSQL "Insert into tbl_Updates (Date1, Memo1, ProjectName) " & _
"Values (#" & Me.txtDate1 & "#, '" & _
Me.txtMemo1 & "', '" & _
Me.cboProjectName & "')"
DoCmd.SetWarnings True 'After
Me.cboProjectName = ""
Me.txtDate1 = ""
Me.txtMemo1 = ""