Error on Form

alpine82

Registered User.
Local time
Today, 14:17
Joined
Jun 5, 2003
Messages
27
I have a form with a subform on it. The subform is in the default view of "continuos forms". I have a couple of macros running in the background setting values to some fields, nothing special really. However I keep getting the error message when I open the form and start filling in the first field on the parent form, "The Microsoft Jet database engine cannot find a record in the Table 'Item File' with key matching field(s) 'ItemNumber'. What does this error mean? And how can I stop it?
 
I'm guessing you have a reference to ItemNumber somewhere in your sub form (Child/Master fields) or macro(s). It is looking for records that match the one in the main form. Because there are no records that match the ItemNumber being provided from the Main form, the error occurs.

Do you have code running on the Change event of the first field?
 
Narrowed it down

I narrowed it down I think, by playing with the form a little. When I have the table 'ItemFile' in my subform query it gives the jet engine error I spoke about earlier. However, if I take that table out of the query I don't get an error. The two tables in question are 'Item File' and 'Item Subform Table'. They are linked by 'ItemNumber', (here is where I think the problem is), and in 'Item File' 'ItemNumber' is the primary key, and in the other table 'ItemNumber' is not the primary key. Any ideas?
 

Users who are viewing this thread

Back
Top Bottom