[AccessD] invalid number of arguments

Pedro Janssen pedro at plex.nl
Tue Jun 14 16:26:37 CDT 2005


Indeed i am not passing in anything, now i understand why the error occurs.

Is there no other way to work arround this.

Pedro Janssen



----- Original Message -----
From: "Neal Kling" <nkling at co.montgomery.ny.us>
To: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
Sent: Monday, June 13, 2005 9:51 PM
Subject: RE: [AccessD] invalid number of arguments


> I believe he's passing nothing, which of course results in the missing
parameter. Perhaps you can explain this better than I.
>
> Neal
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Mike & Doris
> Manning
> Sent: Monday, June 13, 2005 3:46 PM
> To: 'Access Developers discussion and problem solving'
> Subject: RE: [AccessD] invalid number of arguments
>
>
> What are you passing in as the value of "tblDebiteurAlgemeen"?
>
> Doris Manning
> Database Administrator
> Hargrove Inc.
> www.hargroveinc.com
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Pedro Janssen
> Sent: Monday, June 13, 2005 3:15 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] invalid number of arguments
>
>
> Hello Neal,
>
> i now have tried:
>
> Function DeleteTableLink(tblDebiteurAlgemeen As String) As Boolean On
Error
> GoTo Err_DeleteTableLink
>   Dim db As Database
>
>   Set db = DBEngine(0)(0)
>   db.TableDefs.Delete (tblDebiteurAlgemeen)
>   db.TableDefs.Refresh
>
>   DeleteTableLink = True
>
> Exit_DeleteTableLink:
>
> etc.etc.etc
>
>
> but i still have the error.
>
> Anyone any ideas.
>
> Pedro
>
>
>
> ----- Original Message -----
> From: "Neal Kling" <nkling at co.montgomery.ny.us>
> To: "Access Developers discussion and problem solving"
> <accessd at databaseadvisors.com>
> Sent: Monday, June 13, 2005 2:52 PM
> Subject: RE: [AccessD] invalid number of arguments
>
>
> > I see you're setting the table variable right in the function. But the
> function it's self is still expecting you to pass a table name. I suspect
> this may be where you are having a problem. Either redeclare the function
> without the strTableName parameter, or pass it the table name. In other
> words instead of setting strTableName in the function, call the function
> like this:
> >
> > DeleteTableLink "tblDebiteurAlgemeen"
> >
> > Don't forget to comment out the line
> > strTableName = "tblDebiteurAlgemeen"
> >
> > Neal
> >
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com
> > [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Pedro
> > Janssen
> > Sent: Sunday, June 12, 2005 5:51 PM
> > To: AccessD at databaseadvisors.com
> > Subject: [AccessD] invalid number of arguments
> >
> >
> > Hello Group,
> >
> > i am using a function that Neil Kling provided me in the past. When
> > running it from an expression i get an error:
> >
> > Invalid number of arguments.
> >
> > Who can help me with this
> >
> > Pedro Janssen
> >
> >
> >
> >
> > Function DeleteTableLink(strTableName As String) As Boolean On Error
> > GoTo Err_DeleteTableLink
> >   Dim db As Database
> >
> >   strTableName = "tblDebiteurAlgemeen"
> >
> >   Set db = DBEngine(0)(0)
> >   db.TableDefs.Delete strTableName
> >   db.TableDefs.Refresh
> >
> >   DeleteTableLink = True
> >
> > Exit_DeleteTableLink:
> > Exit Function
> >
> > Err_DeleteTableLink:
> >   Select Case Err
> >   Case 0    'insert Errors you wish to ignore here
> >     Resume Next
> >   Case 3265      'Item doesn't exist in collection
> >         Resume Next
> >   Case Else 'All other errors will trap
> >     Beep
> >     MsgBox Err.Number & "; " & Err.Description, , "Error in function
> basObjectHandlers.DeleteTableLink"
> >   Resume Exit_DeleteTableLink
> >   End Select
> >   Resume 0  'FOR TROUBLESHOOTING
> > End Function
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>





More information about the AccessD mailing list