Invalid Procedure Call on Forms

Hello, any suggestions are appreciated!

I imported tables from our media database into our membership database.  I 
was going to combine the information so that I could streamline orders with 
lookup fields but my supervisor didn't like it so...  I went back to the 
media database and now NONE of the form buttons are working.  

The forms open, and all the reports, queries, and tables open without 
incident.

However, when I click any button on any form (to call up a report, query or 
another form), I receive an error: "Invalid Procedure Call or Arguement".  

I tried creating a new form from scratch but the buttons still don't work.

The other database, our main database, works just fine.  All is well on that 
end, both databases are stored on the same computer network.

When the debugger opens, there is no code showing.  There is an area labeled 
"immediate" on the bottom of the screen.  I do see the code if I open the 
project and click on the forms.  Here is a sample:

Private Sub cmdMedia_Click()
On Error GoTo Err_cmdMedia_Click

    Dim stDocName As String

    stDocName = "rptMedia"
    DoCmd.OpenReport stDocName, acPreview

Exit_cmdMedia_Click:
    Exit Sub

Err_cmdMedia_Click:
    MsgBox Err.Description
    Resume Exit_cmdMedia_Click
    
End Sub

On another note, I am of the mind that everything we do should be in one 
database and our switchboard should make it easy for people to access any 
information needed.  Is this a standard and prudent viewpoint or should there 
be separation?  These forms are working well on the main database but I guess 
I have to accept that my supervisor has the final say...
0
Utf
2/28/2008 1:33:00 PM
access.forms 6864 articles. 2 followers. Follow

3 Replies
3198 Views

Similar Articles

[PageSpeed] 39

Mariah, I'm not sure what specifically is causing your error, but here's a 
standard sequence that fixes a whole raft of possible causes.

Follow these in order:

1. Uncheck the boxes under:
    Tools | Options | General | Name AutoCorrect
In Access 2007, it's:
    Office Button | Access Options | Current Database | Name AutoCorrect
Explanation of why:
    http://allenbrowne.com/bug-03.html

2. Compact the database:
    Tools | Database Utilities | Compact/Repair
or in Access 2007:
    Office Button | Manage | Compact/Repair

3. Close Access. Make a backup copy of the file. Decompile the database by 
entering something like this at the command prompt while Access is not 
running. It is all one line, and include the quotes:
    "c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
        "c:\MyPath\MyDatabase.mdb"

4. Open Access (holding down the Shift key if you have any startup code), 
and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
    http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

7. Still in the code window, choose Options on the Tools menu. On the 
General tab, make sure Error Trapping is set to:
    Break on Unhandled Errors
and the Compile on Demand is unchecked.

At this point, you should have a database where the name-autocorrect errors 
are gone, the indexes are repaired, inconsistencies between the text- and 
compiled-versions of the code are fixed, reference ambiguities are resolved, 
the code syntax is compilable, and the VBA options are set to show errors 
and avoid this kind of corruption.

If it is still a problem, the next step would be to get Access to rebuild 
the database for you. Follow the steps for the first symptom in this 
article:
    Recovering from Corruption
at:
    http://allenbrowne.com/ser-47.html

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Mariah" <Mariah@discussions.microsoft.com> wrote in message 
news:EF2B118D-41F5-4E49-8355-0D0F650B351E@microsoft.com...
> Hello, any suggestions are appreciated!
>
> I imported tables from our media database into our membership database.  I
> was going to combine the information so that I could streamline orders 
> with
> lookup fields but my supervisor didn't like it so...  I went back to the
> media database and now NONE of the form buttons are working.
>
> The forms open, and all the reports, queries, and tables open without
> incident.
>
> However, when I click any button on any form (to call up a report, query 
> or
> another form), I receive an error: "Invalid Procedure Call or Arguement".
>
> I tried creating a new form from scratch but the buttons still don't work.
>
> The other database, our main database, works just fine.  All is well on 
> that
> end, both databases are stored on the same computer network.
>
> When the debugger opens, there is no code showing.  There is an area 
> labeled
> "immediate" on the bottom of the screen.  I do see the code if I open the
> project and click on the forms.  Here is a sample:
>
> Private Sub cmdMedia_Click()
> On Error GoTo Err_cmdMedia_Click
>
>    Dim stDocName As String
>
>    stDocName = "rptMedia"
>    DoCmd.OpenReport stDocName, acPreview
>
> Exit_cmdMedia_Click:
>    Exit Sub
>
> Err_cmdMedia_Click:
>    MsgBox Err.Description
>    Resume Exit_cmdMedia_Click
>
> End Sub
>
> On another note, I am of the mind that everything we do should be in one
> database and our switchboard should make it easy for people to access any
> information needed.  Is this a standard and prudent viewpoint or should 
> there
> be separation?  These forms are working well on the main database but I 
> guess
> I have to accept that my supervisor has the final say... 

0
Allen
2/28/2008 1:58:04 PM
All excellent suggestions by Allen - when this happens to me, it's
usually because of a corrupt record.  I can pick it out quite easily
in the table because it has very strange characters (chinese, etc).  I
can't delete the record right away - I have to compact and repair the
database.  The repair won't fix the data in the corrupted record, but
it will let me delete it so I can keep moving forward.
0
Capt_Plutonium
3/10/2008 2:33:19 PM
Okay: that's the specific kind of corruption that's most common for you.

If you ever find you can't delete that bad record, this might help:
    http://allenbrowne.com/ser-47.html#RowsShowDeleted

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Capt_Plutonium" <capt_plutonium@hotmail.com> wrote in message
news:c96d5ee5-6dd7-4f64-8d48-8c95e3600319@f63g2000hsf.googlegroups.com...
> All excellent suggestions by Allen - when this happens to me, it's
> usually because of a corrupt record.  I can pick it out quite easily
> in the table because it has very strange characters (chinese, etc).  I
> can't delete the record right away - I have to compact and repair the
> database.  The repair won't fix the data in the corrupted record, but
> it will let me delete it so I can keep moving forward.
0
Allen
3/10/2008 3:21:46 PM
Reply:

Similar Artilces:

Invalid File Format
When I start Excel I get an initial message that says ssipro97.dot is an invalid format. Any idea why this would come up? It doesn't seem to affect how Excel works, it's just annoyint. ...

Form Question #2
I'm having trouble figuring out how to start a form in excel. On sheet 1 I have the column headings. I want to be able to put the information in as I go. Am I supposed to have a list already created for the form to work? Please excuse my ignorance. Any suggestions which would lead me out of the tunnel would be greatly appreciated. Travis you just need the headings and at least one row of data and click anywhere in the field and choose Data>form and it should put a form field for each column heading. >-----Original Message----- >I'm having trouble figuring out how...

Invalid syntax
I get the error invalid syntax for the following line : ( summing up figures in case GetBonus = Yes) Bonus : iif(getBonus = -1;nz(BonusL1;0)+ NZ([BonusL2];0)+ NZ([BonusL3];0) could you help ? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200712/1 Ditch the semicolons. iif( Formula to test,results if true, results if false.) I would guess you want iif(getBonus = -1,nz(BonusL1;0)+ NZ([BonusL2];0)+ NZ([BonusL3],0) peljo via AccessMonster.com wrote: > I get the error invalid syntax for the following line : ( summing up figures...

Calling Procedure in Hidden Form
What is the syntax for calling an event procedure in a hidden form from a visible (current) form? My hidden form has two procedures: form_open and Closebutton_click. I assume when I open the hidden form the form_open procedure is run. I want to run the Closebutton_click procedure in the hidden form when a certain event occurs on the visible (current) form. The CloseButton_click will run some code and then close the hidden form. On Wed, 7 Apr 2010 06:26:06 -0700, Stu <Stu@discussions.microsoft.com> wrote: You can make that procedure Public rather than the current P...

How do I make a follow up call reminder from "Contacts"
I'd like to be able to open a contact, get the phone number, call the contact, leave a message, and then make an appointment with myself a week later to call the contact back to follow up with them. Basically, I'd like to be on a contact's page and make an appointment right from there. Then when the day for the follow up call comes along, I can click on it in my calendar and it will take me right to the contact page. Does this make sense? I'm sure it's a totally basic function. I have gotten as far as figuring out to drag the contact to "Calendar"...

problem with calling mfc dll from #C
Hi All, Debug Assertion Failed File dbgheap.c _CrtIsValidHeapPointer() I get the above while trying to CGAL::Intersection(Polygon_2 , Polygon_2,std::back_inserter(...)) in a MFC DLL project (Visual Studio .Net 2003) I call it from C# project. What to do to fix my project? Please Help Thanks Miki How are you calling the MFC dll? Is it managed code with MFC or simply an COM server which has been imported in managed code? Also, you are better off posting this in dotnet.vc newsgroup. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "miki" <mich...

Opening of Form Code
Hey Everyone, Is there a way that i can code my form so that when it opens the "Filter for:" box pops up for one of my fields so i can go right to that record? The users of my database do not want to be able to view all records of the form. They want to only be able to add new records or edit specific records. This is why I am hoping at figuring out how to honor their request. Thanks One approach to accomplishing this is to add an (unbound) combobox in the header of the form, and in that combobox, list the available-for-edit records. Use the combobox's AfterUpdate eve...

macro attached to command button
Hi Can I attach a previously contrsucted Macro to a new cmd button placed on a VBA user form ? If so how ? -- thanks Roy Try calling that macro as below Private Sub CommandButton1_Click() Call Macroname End Sub -- Jacob "Roy Gudgeon" wrote: > Hi > > Can I attach a previously contrsucted Macro to a new cmd button placed on a > VBA user form ? > > If so how ? > -- > thanks > Roy Hi Jacon So easy, I'llget the hang of this eventually ! Got small problem with Macro but I'll sort that -- thanks ...

invalid handle
hi frds i m very new in vc++ and i m founding too much difficulty in this so plz can any one solve this problem .... actully i m inserting a image in list box using this code ........ everything is returning write thing still it is saying invalid handle after ImageList_Add(hList,m_hBmpNew,0); when i m going to dibug it plz help me BOOL Fun() { // Create 256 color image lists HIMAGELIST hList = ImageList_Create(32,32, ILC_COLOR8 , 8, 1); HBITMAP m_hBmpNew = (HBITMAP) LoadImage( AfxGetInstanceHandle(), // handle to instance "c:\\img.bmp", /...

Invalid Property Value
I have a macro that uses an input form to populate a spreadsheet. There are various validations that run prior to the data populating. On one validation if an incorrect choice has been made from a drop down box a error message prompts the user to select again form the drop down box and will not populate until a valid selection has been made. I am now getting an Excel warning message (exclamation message) saying 'Invalid Property Value' after the spreadsheet has populated which only happens if an invalid selection has been made and corrected from the drop down box. If the ...

Form to send by Email
I just made a small form in Excel with the intention of copying and pasting it into an email message. The recipient would read it, then click on "reply" and go down and complete the form. Everything works except I included a control box where a check mark would appear when the box is selected by the recipient. This box doesn't work at all. Does anyone know why? Also, I am not too sure overall how to make up a form that I can use for completion via email. ...

Excel VBA
I can't seem to find the 'Draw" menu in Excel VBA... Am I correct in assuming that there is none? And that the Frame is the only way to group stuff on a Form?? thanks The frame is typical, but you can group some controls by using the GroupName. If you want lines on the userform, I think lots of people use a label that's really skinny--or use a picture of a line and then use that picture. tmb wrote: > > I can't seem to find the 'Draw" menu in Excel VBA... > > Am I correct in assuming that there is none? > > And that the Frame is the onl...

How do i set open form to current record?
I have a command button on the main form and when clicked a secondary form opens however any data keyed in resets the main form back to record one. How do i set the second form entries to apply to the current record? I'm going to guess that you are requerying the mainform, so that it updates from the data in the second form. Instead of Requery try Refresh when you go back to the main form. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "acss" <joekru98@hotmail.com> wrote in message news:BACE1739-8...

OFX
When doing an update from my broker I get the message cannot establish secure communication with the server. Digital certificate is invalid. OFXIE12038. This is new happening in last month. Broker support says problem is Money 2002 not supported so I installed Money 2005 (with some qualms) and of course, still get the same message. I can access the brokerage website OK from Money, just cannot get statement downloads. -- Bill ...

eConnect SOP Post Procedure
Hello! We are attempting to update the batch ID of an SOP order immediately after completing the integration of that order. The logic for this update is based on whether or not any process holds exist for the order. We would prefer to run this update as a post procedure in the process hold insert (taSopUpdateCreateProcessHold), but there is no post-procedure available for this node. When we attempted to include the logic as part of the header insert (taSopHdrIvcInsert), it did not pick up the process holds... we suspect the taSopUpdateCreateProcessHold node had not yet been run at t...

Invalid Procedure Call on Forms
Hello, any suggestions are appreciated! I imported tables from our media database into our membership database. I was going to combine the information so that I could streamline orders with lookup fields but my supervisor didn't like it so... I went back to the media database and now NONE of the form buttons are working. The forms open, and all the reports, queries, and tables open without incident. However, when I click any button on any form (to call up a report, query or another form), I receive an error: "Invalid Procedure Call or Arguement". I tried creating a...

Invalid Operation 425
I know there are a few other threads pretaining to "Invalid Operation 425, Cash Drawer locked by another application" but the solutions given there have not solved our problem. We have multiple store locations with the exact same set-up but only one is having this problem . The problem happens most of the time but not always. Our set up is RMS version 2.0 Printer - Epson Tm-881V Cash Drawer - APG VB320 OPOS ADK 2.6 Running on Windows XP Pro Any body have an idea? -- Many thanks Jack Master Jack - Without taking time to go back against all old posts and see what is liste...

Renamed invalid sheet name
I have a routine that opens a workbook to access data and then closes it. It has worked fine for years with XP and Excel 2000. Since changing to Win 7 and Excel 2003 it will no longer automatically open. A warning box appears "Repairs to 'Workbook'" and the message "Renamed invalid sheet name". After closing the message box it renames the worksheet to "Recovered_Sheet 1" and opens the workbook. However, this is a manual process and I need it to be automated as before. What I have found (I believe) is that if the file name includes "...

Invalid object name when I try to create a scaler udf in a stored procedure.
I am trying to create a report that shows a company name, all the advisors in that company, then the company's stats (there should be one row for each company). Each of these come from a different table. The advisors are currently being listed as one per line, which means the company name and the stats are all being repeated unneccesarily. I want to concatinate the advisors, so that all the ones that belong to the same company show in the same cell. I wrote this UDF which is located right before my SP: CREATE FUNCTION [dbo].[ConcatAdvisorNames](@Company as varchar(20)) RETURNS VA...

Refreshing data results in "invalid cell reference"
I imported some data from a CSV into a worksheet. On another worksheet (named Chapel) I referenced the data in a formula: {=SUM(IF(Chapel!$A$1:Chapel!$A$1000=Categories!$A1, IF(Chapel!$C$1:Chapel!$C$1000=Categories!A$30,1,0),0))} This formula works fine. Now, if I go and refresh my data I get invalid references in my formula: {=SUM(IF(Chapel!$A$1:Chapel!#REF!=Categories!$A1, IF(Chapel!$E$1:Chapel!$E$1000=Categories!A$30,1,0),0))} Is there some way to make this work? And why do some references to Chapel change but others do not? Notice that the first reference to $A$1000 is now invalid...

how to use invalidate and validate
I am using DrawRectangle and SetPixel and some other drawing functions over an image displayed in the background. I'm wondering what exactly I should be doing to make sure that when my application regains focus that things were like they were when focus was lost. I'm not quite sure what the Validate functions do, which is part of the problem. -- to reply, remove Big10 from address Andrew, There is only one way to make sure that the drawing is persistant even after another application has been activated (or indeed anything else forcing a redraw, such as the display of a dialogbox)...

Forms #3
Have added form to website (http://sandrahand.com/gourmetclub/becomeamember). Host is godaddy.com; have installed frontpage extensions (deleted and reinstalled today); have email off of domain at GoDaddy; continue to receive message about form not being able to config to send results via e-mail. Bizarre. Also, confirmation page (http://sandrahand.com/gourmetclub/confirmation) does not appear after submit on page where form is located. Receive error page. Have spent HOURS! Help! Thanks! ...

Auto fill field on form
Using 2007 -- Have a form with customer ID and customer name. Would like to enter the customer ID and have it automatically fill in the customer name. "Deanna" <Deanna@discussions.microsoft.com> wrote in message news:61C42352-D05E-4AF6-BE43-F255D7A15E1C@microsoft.com... > Using 2007 -- Have a form with customer ID and customer name. Would like > to > enter the customer ID and have it automatically fill in the customer name. That's easy, but remember, you should not store the customer name twice, NOT FOR ANY REASON. Use a combo box with 2 columns...

correct recovery procedure ex 5.5
Hi, What is the correct recovery procedure for unscrambling a 5.5 database? I have tried eseutil /p ... and /d and then isinteg ... alltests I got 9 fixes after the latter. Unfortunately the exch services still wont start, saying there are inconsistencies No backup, of course ... Any help greatly appreciated. NEIL Keep running isinteg....alltests till 0 errors/fixes -------------- Sushil Sharma Microsoft PSS "Please do not send email directly to this alias. This alias is for newsgroup purposes only." "This posting is provided "AS IS" with no warranties, and...

Invalidate
Hi, I added a control to a View. So, I believe, that when I call Invalidate(), it effects the control and I get flicker. I am not erasing the background. BOOL CViewX::OnEraseBkgnd(CDC* pDC) { return TRUE; // return CView::OnEraseBkgnd(pDC); } Is there anything else that might be causing it? Thanks, -- dbgrpt.c -1 Computer wrote: > Hi, > > I added a control to a View. > So, I believe, that when I call Invalidate(), > it effects the control and I get flicker. > > I am not erasing the background. > BOOL CViewX::OnEraseBkgnd(CDC* pDC) > { > return TRUE; ...