Urgent! Please help

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
 
S

Sapphire

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
 
D

Douglas J. Steele

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
.
 
S

Sapphire

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
.


.
 
D

Douglas J. Steele

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
.


.
 
S

sapphire

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
.



.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top