943,913 Members | Top Members by Rank

Ad:
Nov 17th, 2008
0

Error handling

Expand Post »
On not filling a text box of a field that is madatory in the database i want to throw a error message to user and set the focus to that particular Text box
Please help me in setting focus to that particulat text box.

Private Sub Form_Error(DataErr As Integer, Response As Integer)
Select Case DataErr
Case 3314
    
    MsgBox "A required field is blank.", vbCritical
    Response = acDataErrContinue
End Select
End Sub

Regards
Jagadeep Reddy
Last edited by peter_budo; Nov 18th, 2008 at 6:59 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Similar Threads
Reputation Points: 18
Solved Threads: 0
Posting Whiz in Training
dinilkarun is offline Offline
206 posts
since Feb 2008
Nov 20th, 2008
0

Re: Error handling

Hi,
If you are using access you have to include the code in the before_update event of the text box.
Reputation Points: 13
Solved Threads: 29
Junior Poster
kb.net is offline Offline
169 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS Access and FileMaker Pro Forum Timeline: unordered TAB movement in Front end
Next Thread in MS Access and FileMaker Pro Forum Timeline: sort fields in queries





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC