Have you compiled the code? Do you have error handling that shows what
event is producing the error? I know you said that if a line of code in
CheckMDBF is removed, the error stops, so I assume the error is in the
CheckMDBF function, but I don't know that for sure. In any case, it would
help knowing what line is generating the "Property not found" error. I
notice that you do not use the Me.MDBF.Undo syntax (you leave out the Me).
It may be worth trying the Me syntax. Also, if MDBF is both a control and a
field, Access could be getting confused when it tries to apply Undo to a
field rather than a control. Access contributes to this problem by using
the field name as the default control name for a text box, so it is up to
you to rename such text boxes.
What is MDBF? I assume it is a bound control such as combo box. Have you
tried changing:
If Not CheckMDBF Then
to
If CheckMDBF = False
Remember that we cannot see your database, and are not familiar with the
real-world situation you are trying to address. At a guess I would say this
has something to do with refilling fuel tanks, but even if that is true,
there is no way of knowing if MDBF is a field or a control, or what you mean
by "'MDBF will kick fill in before preschedule will". I am taking a stab
at the question because it has not received other responses after a couple
of days. My comments and suggestions of things to try are just things I
noted. I could not say why datasheet view specifically is causing problems.
In your follow-up post you say that the error message has changed. Do you
mean that the circumstances that produced "Property not found" now produce
"No current record"?
Have you tried Compact and Repair? If no luck there, you may as well export
everything to a new, blank database. It may be worth turning off Name
Auto-Correct when you do. This link has more information about that:
http://allenbrowne.com/bug-03.html
> I'm not sure why also, but even with error trapping in place in the
> 'property
[quoted text clipped - 68 lines]
>>
>> End Function
swas - 11 Jun 2007 07:18 GMT
BruceM,
Thanks for the detailed response.
I had tried the majority of your suggestions with no luck prior to posting.
MDBF is a field and control, and I hadn't tried renaming the text box - this
sounds like a possibility. I solved the problem by shifting the checking into
the form beforeupdate, so CheckMDBF only needs using once within this routine
(Rather than a function).
For what it is worth, it is tracking stocking. FillFrequency is prescheduled
stocks, with Max Days Between Fills an overriding maximum setting.
Thanks again.
swas
> Have you compiled the code? Do you have error handling that shows what
> event is producing the error? I know you said that if a line of code in
[quoted text clipped - 104 lines]
> >>
> >> End Function