|
 |
access thread: Re: Passing Parameters To A Function Access 2000
Message #1 by "sue_basker" <sue_basker@h...> on Fri, 2 Mar 2001 07:56:11
|
|
> In short I am unable, in Access 2000, to pass more than one parameter to
a
> Function. I keep getting syntax error or expected =.
>
> If I use the debug window and type say ?capitalize
> (?tblcompany?, ?country?) the function runs correctly.
>
> However if I create a command button and in the On Click put the same
> statement in (minus the ?) I get syntax error. In this instance both
> parameters are String variables as required by the Function Capitalize.
I
> have tried other test Functions with other variable types and the same
> problem arises. My only success is when I have a function that requires
> only one parameter.
>
> I have DAO 3.6 installed and need to call a function, amongst other
> things, from the On Click event of a command button.
>
> Can anyone help please ?
>
> Regards
>
> Mike Poulton
Have you tried swapping round the parameters to see which the program
fails on? the error message sounds as if it's more to do with
the "tblCompany" parameter - usually this kind of message means you've not
set a reference to an object, or have not closed off a statement (eg
missed out an 'end with').
Message #2 by "Mike Poulton" <mike_poulton@h...> on Fri, 2 Mar 2001 19:18:39
|
|
Problem now solved please delete from messageboard thanks for your help
regards
Mike Poulton
> > In short I am unable, in Access 2000, to pass more than one parameter
to
> a
> > Function. I keep getting syntax error or expected =.
> >
> > If I use the debug window and type say ?capitalize
> > (?tblcompany?, ?country?) the function runs correctly.
> >
> > However if I create a command button and in the On Click put the same
> > statement in (minus the ?) I get syntax error. In this instance both
> > parameters are String variables as required by the Function
Capitalize.
> I
> > have tried other test Functions with other variable types and the same
> > problem arises. My only success is when I have a function that
requires
> > only one parameter.
> >
> > I have DAO 3.6 installed and need to call a function, amongst other
> > things, from the On Click event of a command button.
> >
> > Can anyone help please ?
> >
> > Regards
> >
> > Mike Poulton
> Have you tried swapping round the parameters to see which the program
> fails on? the error message sounds as if it's more to do with
> the "tblCompany" parameter - usually this kind of message means you've
not
> set a reference to an object, or have not closed off a statement (eg
> missed out an 'end with').
>
Problem now solved please delete from messageboard thanks for your help
regards
Mike Poulton
|
|
 |