473,434 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

Odd error setting a form's recordset property

Hello,

I have an MS-Access 2003 (ADP) project that uses SQL2000.

I have a form that displays all "OPEN" items associated with a
particular user. While viewing this form the user can click a search
button that will let them review "CLOSED" or "SUBMITTED" items using
the same form.

I call a stored procedure to get the results of their "Search" and try
to replace the forms.recordset value.

Set RS = objSAP8.GetObjects(intStatusID,
intUserID )

If RS Is Nothing Then
MsgBox ("No Records Match Your Search Criteria.")
Else
' Set the form's Recordset property to the ADO recordset

'--------------------------------------------------------------------------
Set Me.Recordset = RS
End If

This always works find as long as the initial recordset of the form had
data. In other words, if the user comes to this screen initially the
form is loaded with all his open records. If he searches for "closed"
records, the code displays them nicely.

If the user comes to this form having no "open" records and they
execute to the search for closed records it crashes on the:
Set Me.Recordset = RS line telling me:

"Run-time error '2107': The value entered doesn't meet the validation
rule defined for the field or control"

This also de-stabilizes the application and it eventually crashes
Access.

The only difference is the fact that condition of the original
Form.Recordset.

Just wondered if anyone had any insight before I begin the MS-Access
Developer shuffle:

Decompile
Recompile
Create a new project and copy all objects from old into new project.
Rename the application using 666 in the name.
Jump up and down
Stand on one foot.....

Thanks

Dec 13 '05 #1
1 3668
More info....

The form is currently holding a partially complete "New record" when I
try to set the recordset:

Set Me.Recordset = RS

It's trying to write this new record to the database and all of the
fields are not set.

Since I don't care - is there a way to abandon the current "new" record
and replace the form's data with my new recordset?

Dec 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bryan Tang | last post by:
I built an ASP to search the content in index server. It is ok if search in English. Whenever I search in Chinese, I will got the following error message, CreateRecordset ?u?~ '80004005' ...
2
by: PA | last post by:
Hi All, Thanks for your attention..I appreciate that. -----Problem description -----------Start---------------------- Database : DB2 UDB 8.2 on Windows 2003 Client: VB6/ADO 2.7 on Windows...
3
by: Paul | last post by:
I have an Access 2000 database with a form that is giving me some major headaches. When you open the form, it displays all records and allows editing, but has AllowAdditions set to False so that...
14
by: Abhi | last post by:
FYI: This message is for the benefit of MS Access Community. I found that this prblem has been encounterd by many but there is hardly any place where a complete solution is posted. So I thought...
9
by: TD | last post by:
I am trying to add transactions to my code. The original code worked fine until I followed an example to setup transactions, now the code does strange things, but no error messages. Could...
16
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
9
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
5
by: dana1 | last post by:
Hello Experts! Does anyone know if there is a way to set the values of query parameters from VBA for a report's recordsource? (i.e., I want to set the values of the parameters and NOT have the...
0
by: Andy | last post by:
Hello all, I have a user getting an error 438, object doesn't support this prop. or method, when I run code to setup the treeview control. I'm using the MSCOMCTRL.OCX, file version: 6.01.9545....
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.