UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Big Problem. Error 2107 unexplained.    
 
   
Snare
post Apr 18 2005, 10:19 AM
Post#1



Posts: 44
Joined: 1-February 05



Hi,
I have been trying very hard to find the source of this error, but have found nothing so far. The
error message is as follows:
Run-time error 2107:
The value you entered doesn't meet the validation rule defined for the field or control.
I have attached the database for anyone who would be willing to take the time to help examine this
problem. Any help would be very greatly appreciated, knowing that it would probably take some time
to understand how the database works.
How to produce the error:
Open the "frmProjectInformation" form.
Click on the "Components and Documents" tab button at the top of the form.
Click the "Add New Component" button.
A pop-up form will appear asking you to select the new component type.
Click "ESP Evaluation" and then click OK.
The frmComponentInformation form will open (as it should) but then the error message appears.
The error seems to occur when trying to set the record source of one of the subforms on
frmComponentInformation. However, everything seems to work fine with all of the other component
types. For some reason, "ESP Evaluation" is the only one which generates this error. The weird
thing is that I am setting the record source for the form in pretty much the same way for all
types. I can't figure out why the error happens in this case.
Please help. I really have no clue how to continue. Thanks.
- Mark
Go to the top of the page
 
Snare
post Apr 18 2005, 10:22 AM
Post#2



Posts: 44
Joined: 1-February 05



I am having trouble attaching the file. It has been zipped and is under 500k. Not sure why it is not working. All I get is the "The page cannot be displayed" error.
Go to the top of the page
 
Snare
post Apr 18 2005, 10:28 AM
Post#3



Posts: 44
Joined: 1-February 05



trying to attach.
Go to the top of the page
 
Snare
post Apr 18 2005, 10:30 AM
Post#4



Posts: 44
Joined: 1-February 05



that was not the database. I was just testing why I could not attach the file.
Go to the top of the page
 
Snare
post Apr 18 2005, 10:32 AM
Post#5



Posts: 44
Joined: 1-February 05



Could I e-mail it to someone? This is not working.
Go to the top of the page
 
dannyseager
post Apr 18 2005, 10:35 AM
Post#6


UtterAccess VIP
Posts: 13,031
Joined: 2-March 04
From: Leicester, UK


to attach the Database do a compact and repair from the tools menu, then zip it up and post it. it has to be under 500KB
Go to the top of the page
 
jsitraining
post Apr 18 2005, 10:55 AM
Post#7


UtterAccess VIP
Posts: 5,241
Joined: 30-June 03
From: Scotland (Sunny Glasgow)


OK, I managed to attach it.
Odidn't get the error you specified, I did get error:
A related record is required in tblComponents.
Does this make sense to you that it might happen? (rather than have me trawl through all that code and the data.)
Jim
Edited by: jsitraining on Mon Apr 18 11:58:07 EDT 2005.
Go to the top of the page
 
Snare
post Apr 18 2005, 11:14 AM
Post#8



Posts: 44
Joined: 1-February 05



Thanks for attaching the file.
Yes, I got that error too: "a related record is required in tblComponents". It comes after the error I first specified, and I thought maybe they were both a result of the same problem.
However, this does not make much sense to me.
In fact, if you look in the table tblComponents afterwards, you will actually see the new record there.
What happens is that based on the component type which you specify, it creates a new record in tblComponents with a new ComponentID. Then it goes to the table depending on the type and creates a new record there with also the same ComponentID.
For example, if you create a new Incident Investigaiton, it creates a new record in tblComponents with, say, ComponentID = 99. Then, it will also create a record in tblIncidentInvestigations with ComponentID = 99.
This works fine for all the types, except for ESP Evaluation. It creates the new record in tblComponents, but it does not create the new record in tblESPEvaluations.
Sorry, I know that there is a huge amount of code there. I'm not quite sure how else to present the problem. If you have an questions about how the database works, please ask me.
Thanks for trying.
Go to the top of the page
 
jsitraining
post Apr 19 2005, 02:41 AM
Post#9


UtterAccess VIP
Posts: 5,241
Joined: 30-June 03
From: Scotland (Sunny Glasgow)


No bother. I'll try to have a look at it today.
Jim
Go to the top of the page
 
jsitraining
post Apr 19 2005, 09:59 AM
Post#10


UtterAccess VIP
Posts: 5,241
Joined: 30-June 03
From: Scotland (Sunny Glasgow)


Hi Snare.
Unfortunately, I have not had ANY time today, so I heven't even had a chance to open your database today. I'll see if I can get a look tomorrow. In the meantime, if anyone else wants to jump in.. feel free frown.gif
Jim
Go to the top of the page
 
Snare
post Apr 19 2005, 10:34 AM
Post#11



Posts: 44
Joined: 1-February 05



Hi,
Thanks again for giving it a shot. After extremely close inspection, I think I fixed it.
I was setting the value of a field in the subform's Current Event. However, I was not aware that setting the control source of a subform object actually calls the Current Event of the form to which it is bound.
Therefore, it was trying to set the value of a field before I specified which record to edit.
I've noticed a few weird things about the Current event, and have decided to avoid using it whenver possible.
But thanks anyways.
- Mark
Go to the top of the page
 
petesmall
post Apr 19 2005, 11:25 PM
Post#12



Posts: 142
Joined: 10-April 05
From: USA-New Jersey


Hi Snare and Jim,
had a few minutes so I have been tracing the code. I found that you could at least get the ESP form open if you deleted the one-to-one relationtionship in the relationship manager. Then when you go to close it you get an error, but at least it begins to suggest an area of investigation.
The error leaves you with a record in tblESPEvaluations with a 0 in the ComponentID field and a record in tblComponents with a ComponentID that was meant for it. If you manually enter that number into the tblESPEvaluations record in place of the 0 all is well. Now you can go back and click the edit component button for instance without trouble.
Thats all for me tonight!
Best,
Pete
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    20th August 2018 - 03:14 PM