Invalid procedure call or argument (Error 5)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I keep getting this error "Invalid procedure call or argument (Error 5)" when
I open a form. I inherited this database, I didn't build this form so I'm a
bit cloudy with regard to the designer's logic.

This error is new, the form was working as designed until today. I compared
the code side by side with an older working version and found no differences.
The code debugger says these lines are the source(or at least part of it).
The only problem is these lines are exactly as written in the working
version.

Private Sub Form_Current()

ActiveDealFind = DealID ' Update the Find Record Combo Box.
CompleteDealFind = DealID ' Update the Find Record Combo Box.
Me.AllowEdits = True

End Sub

The DealID is an auto-number, The activedealfind and completedealfind are
drop down menu's that auto-populate several fields when selected.

Any one have any idea what I may be overlooking?
 
Check the form's Recordsource query; it may be calling a function that is
giving you that error.

Also look for the form's Load event procedure (if there is one) to see if a
function there is giving you that error.

lso look to see if there are any controls with an expression as the control
source, as that expression also may be calling a function that is giving you
that error.

In general, that error is caused by a Null value as the argument of a
function or subroutine that is not designed to accept a Null value; or that
the value of the argument for an array is outside the range of the lower
bound and upper bound values.
 
That helps, but I'm not out of the woods yet.
I'm now getting this error:
"the expression ON Current you entered as the event property setting
produced the following error: Ambiguous name detected:
Activedealfind_afterupdate.

I can't find any differences between the working version and the broken one.
I've looked over the code and any event remotely associated with this form,
can't find the problem.
 
Go into your VB Editor and do a find on all the code in your project looking
for Activedealfind_afterupdate. The error you are getting means it is
defined more than once.

It is also possible this could be a corruption problem.
 
Thanks for the response, I did that, and eliminated the duplicates. Now I'm
back to the original error, pointing to the same lines I mentioned in the
first post.
 
1. Is there any code in any event that fires when the form is opened?
Load, Open, Activate? If so, go into debug, set a breakpoint on the first
line and trace throught the code until it breaks.

2. Has anything in the environment changed? Any Windows updates, any Updates
to Access or Service Pack installations?

3. The duplicate procedure names you deleted - Where were they, what forms?,
was one of them in the form that is having the problem? What does that
procedure do?

4. Is it just the one form, or are all forms having the same problem?

5. How long since you have been to Niagra Falls and have you ever dreamed of
machine gunning a bunch of people just be cause they are morons?

Opps, that question is from a different survey :) Anyway, hopefully some of
those questions will lead you to finding the problem. If you need more
assistance, post back. I am out on Friday, so I will check for posts on
Monday.

Good Luck.
 
Where is DealID defined and set?


Tedd N said:
Thanks for the response, I did that, and eliminated the duplicates. Now I'm
back to the original error, pointing to the same lines I mentioned in the
first post.
 
After way too many dead ends, we found someone changed some of the data
causing part of this error. The remainder of the problem remains a mystery.
At the time of the original post we did not have a recent backup available, I
found one over the weekend. I now have redundant backups. Thanks for all
the help!
 
Back
Top