This topic is locked

Required Field Notice -vs- Error Notice

12/29/2005 5:23:45 PM
ASPRunnerPro General questions
J
jim-mullowney@bresnan.net author

I have a form that is adding a record. It has four required fields, if they are all completed the record adds, if any of them are missing, I get an Error Message rather than the pop-up window for field required. Other add pages I have on the project work fine. The four fields are all drop downs.
The error I get is:
Technical information

Error description:[Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find a record in the table 'tblfeeschedule' with key matching field(s) 'FeeScheduleID'.

URL: /Studies_add.asp

SQL query: insert into [Studies] ([NumberOfImages], [MCategoryID], [FeeScheduleID], [Notes], [PID], [StatusID], [PDate], [PTime], [DateSubmitted], [PSRS], [AdditionalPaperwork], [ReasonForExam], [FaxNumber], [FaxNumberAlt], [PatientID], [EmployeeID]) values (3, 0, 0, '', 0, 0, '12/29/2005', '2:35:44 PM', '12/29/2005 2:35:44 PM', 0, 0, '', '', '', -180969362, 20)
It looks like it is trapping for errors before field required.
[MCategoryID], [FeeScheduleID], [PID], [StatusID] are the required fields.

Sergey Kornilov admin 12/30/2005

This error is not related to required field issue.
This error message means you putting a value into FeeScheduleID field that do not exist in tblfeeschedule table. Since there is a relationship between these two tables you need to put existing value into FeeScheduleID field.
I recommend to make FeeScheduleID field a Lookup wizard that pulls correct FeeScheduleID values from tblfeeschedule table.

J
jim-mullowney@bresnan.net author 12/30/2005

This error is not related to required field issue.

This error message means you putting a value into FeeScheduleID field that do not exist in tblfeeschedule table. Since there is a relationship between these two tables you need to put existing value into FeeScheduleID field.
I recommend to make FeeScheduleID field a Lookup wizard that pulls correct FeeScheduleID values from tblfeeschedule table.


Actually, the FeeScheduleID is a lookup field from tblfeeschedule, as are the other required fields. They are all lookup tables. If I do not select a value, it seems to default to a zero, and that may be causing the problem. When I enter the form, before I select any values, I click save, and it generates an error. Even though I have four lookup fields that are required.

Sergey Kornilov admin 12/30/2005

Did you mark this field as required in ASPRunnerPro?

J
jim-mullowney@bresnan.net author 1/9/2006

Did you mark this field as required in ASPRunnerPro?


Yes, all four fields that are drop downs are required. After additional research, I made a change to an SQL filter being used for this page. I stopped receiving the error message and the pop-up required field worked as designed. I believe it was erroring out before it reached the required field logic. The filter on the page was returning zero records and causing this page to error, it was tied to the filter by ownerID.
You can close this issue for me.