Urgent! Please help

  • Thread starter Thread starter Sapphire
  • Start date Start date
S

Sapphire

Hi,

Customer is an Option Group... When I pass it as an
arguement to a stored procedure which takes integer
parameters, I used the syntax

convert(int, ' " &[Forms]![CCN Entry/Edit]![Customer]&"')

but I get an error message saying that there is a suntax
error to convert varchar to int.

Does anybody know how to do this the proper way?

Thanks
 
Forgot to mention the whole call.

exec dbo.ProcedureName 'convert(int, ' " &[Forms]![CCN
Entry/Edit]![Customer]&"')'

I really need to know how to work this out asap.. Thanks
 
What happens if you simply use

exec dbo.ProcedureName [Forms]![CCN Entry/Edit]![Customer]

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Sapphire said:
Forgot to mention the whole call.

exec dbo.ProcedureName 'convert(int, ' " &[Forms]![CCN
Entry/Edit]![Customer]&"')'

I really need to know how to work this out asap.. Thanks

-----Original Message-----
Hi,

Customer is an Option Group... When I pass it as an
arguement to a stored procedure which takes integer
parameters, I used the syntax

convert(int, ' " &[Forms]![CCN Entry/Edit]![Customer]&"')

but I get an error message saying that there is a suntax
error to convert varchar to int.

Does anybody know how to do this the proper way?

Thanks
.
 
I have not tried it as you sugested but I did use the
syntax with single quotes as

exec dbo.ProcedureName '[Forms]![CCN Entry/Edit]!
[Customer]'

and I still got the same error. But I sure will try it
out.. Thanks

-----Original Message-----
What happens if you simply use

exec dbo.ProcedureName [Forms]![CCN Entry/Edit]![Customer]

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Forgot to mention the whole call.

exec dbo.ProcedureName 'convert(int, ' " &[Forms]![CCN
Entry/Edit]![Customer]&"')'

I really need to know how to work this out asap.. Thanks

-----Original Message-----
Hi,

Customer is an Option Group... When I pass it as an
arguement to a stored procedure which takes integer
parameters, I used the syntax

convert(int, ' " &[Forms]![CCN Entry/Edit]![Customer] &"')

but I get an error message saying that there is a suntax
error to convert varchar to int.

Does anybody know how to do this the proper way?

Thanks
.


.
 
With the quotes around it, you're passing the literal text "[Forms]![CCN
Entry/Edit]![Customer]" to the stored procedure, not the value that it
contains.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Sapphire said:
I have not tried it as you sugested but I did use the
syntax with single quotes as

exec dbo.ProcedureName '[Forms]![CCN Entry/Edit]!
[Customer]'

and I still got the same error. But I sure will try it
out.. Thanks

-----Original Message-----
What happens if you simply use

exec dbo.ProcedureName [Forms]![CCN Entry/Edit]![Customer]

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Forgot to mention the whole call.

exec dbo.ProcedureName 'convert(int, ' " &[Forms]![CCN
Entry/Edit]![Customer]&"')'

I really need to know how to work this out asap.. Thanks


-----Original Message-----
Hi,

Customer is an Option Group... When I pass it as an
arguement to a stored procedure which takes integer
parameters, I used the syntax

convert(int, ' " &[Forms]![CCN Entry/Edit]![Customer] &"')

but I get an error message saying that there is a suntax
error to convert varchar to int.

Does anybody know how to do this the proper way?

Thanks
.


.
 
ooh.. that was really silly of me.. Well, all Ic an say I
amreally new to this :)

Thanks
-----Original Message-----
With the quotes around it, you're passing the literal text "[Forms]![CCN
Entry/Edit]![Customer]" to the stored procedure, not the value that it
contains.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



I have not tried it as you sugested but I did use the
syntax with single quotes as

exec dbo.ProcedureName '[Forms]![CCN Entry/Edit]!
[Customer]'

and I still got the same error. But I sure will try it
out.. Thanks

-----Original Message-----
What happens if you simply use

exec dbo.ProcedureName [Forms]![CCN Entry/Edit]! [Customer]

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



"Sapphire" <[email protected]> wrote
in
message
Forgot to mention the whole call.

exec dbo.ProcedureName 'convert(int, ' " &[Forms]! [CCN
Entry/Edit]![Customer]&"')'

I really need to know how to work this out asap.. Thanks


-----Original Message-----
Hi,

Customer is an Option Group... When I pass it as an
arguement to a stored procedure which takes integer
parameters, I used the syntax

convert(int, ' " &[Forms]![CCN Entry/Edit]!
[Customer]
&"')
but I get an error message saying that there is a suntax
error to convert varchar to int.

Does anybody know how to do this the proper way?

Thanks
.



.


.
 
Back
Top