|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
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
|
|
|