Runtime Error 2107

Z

ZRexRider

My form is based on a SQL statement. When it produces no results I
allow the user to click a "search" button which creates a modified SQL
statement, gets an adodb.recordset and trys to set the form's recordset
to this new recordset.

Set RS = objMyObject.GetWithChildren(intID, _
strDocNumber, _
intTypeID, _
intUserID, _
intStateD, _
intOrgID, _
dtmSubmitStartDate, _
dtmSubmitEndDate)
Set Me.Recordset = RS

This generates Runtime error 2107 "The value entered does not meet the
validation rule defied for the field or control"

Even if I execute Me.Recordset = Nothing it seems to try to validate.
Since my original form SQL produced no results I find it odd that
Me.Recordset would have any reason to execute the before_update event.

Another side affect - once I get this error, Access eventually crashes
with a hard-crash "send info to microsoft message".

How do I get the form to ignore the blank recordset and not try to
validate it when I try to replace its contents?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top