error in runtime: bad query parameter

K

korsakow

Just getting into access 2007 runtimes and am having a problem with opening
forms when passing parameters from one form to another. We have a main menu
and the user selects a facility then if they click on another button, it
opens another form which the data source for that form is an sql 2005 stored
procedures and the parameter being passed to it is a field off the main menu.
This worked fine in 2000 runtime and it works fine if you have full version
on access 2007 installed but not in runtime. We get an error "Bad query
parameter '@Facility'.
Thanks,
 
K

korsakow

how have I to make the workaround with: dbo.PRO_GEBRUIKER and the parameter:
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]?
Is this correct?: - "exec dbo.PRO_GEBRUIKER
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]" -

thanks a lot!
 
T

Tom van Stiphout

On Sat, 12 Jan 2008 19:33:00 -0800, korsakow

No. The statement is passed to the server, which knows nothing about
Forms!...
Rather write something like:
="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName & "'"
Note the single-quotes around the text argument.

-Tom.

how have I to make the workaround with: dbo.PRO_GEBRUIKER and the parameter:
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]?
Is this correct?: - "exec dbo.PRO_GEBRUIKER
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]" -

thanks a lot!

Tom van Stiphout said:
On Sat, 12 Jan 2008 17:46:02 -0800, korsakow

From your reference to SQL 2005 I take it you are using ADP? If so,
take a look at the issues I posted a while back:
http://groups.google.com/groups?as_q="adp+in+a2007+runtime"

Unfortunately they remain unfixed. It very much looks like MSFT has
given up on ADP, at least in the runtime environment.

-Tom.
 
K

korsakow

so, I typ in the RecordSource property everything between - - ?
- ="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName] & "'" -
if I do this, I get the follow error in dutch: Kan voor de tekenreeks vanaf
positie 43 in de opdracht geen afsluitend scheidingsteken vinden. De
tekenreeks begint met: "PRO_GEBRUIKER txt='''''.
in english: can't find closing separation sign for the string as from
position 43 in the task. The string begins with: "PRO_GEBRUIKER txt='''''.

Tom van Stiphout said:
On Sat, 12 Jan 2008 19:33:00 -0800, korsakow

No. The statement is passed to the server, which knows nothing about
Forms!...
Rather write something like:
="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName & "'"
Note the single-quotes around the text argument.

-Tom.

how have I to make the workaround with: dbo.PRO_GEBRUIKER and the parameter:
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]?
Is this correct?: - "exec dbo.PRO_GEBRUIKER
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]" -

thanks a lot!

Tom van Stiphout said:
On Sat, 12 Jan 2008 17:46:02 -0800, korsakow

From your reference to SQL 2005 I take it you are using ADP? If so,
take a look at the issues I posted a while back:
http://groups.google.com/groups?as_q="adp+in+a2007+runtime"

Unfortunately they remain unfixed. It very much looks like MSFT has
given up on ADP, at least in the runtime environment.

-Tom.


Just getting into access 2007 runtimes and am having a problem with opening
forms when passing parameters from one form to another. We have a main menu
and the user selects a facility then if they click on another button, it
opens another form which the data source for that form is an sql 2005 stored
procedures and the parameter being passed to it is a field off the main menu.
This worked fine in 2000 runtime and it works fine if you have full version
on access 2007 installed but not in runtime. We get an error "Bad query
parameter '@Facility'.
Thanks,
 
T

Tom van Stiphout

so, I typ in the RecordSource property everything between - - ?
- ="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName] & "'" -
if I do this, I get the follow error in dutch: Kan voor de tekenreeks vanaf
positie 43 in de opdracht geen afsluitend scheidingsteken vinden. De
tekenreeks begint met: "PRO_GEBRUIKER txt='''''.
in english: can't find closing separation sign for the string as from
position 43 in the task. The string begins with: "PRO_GEBRUIKER txt='''''.

Tom van Stiphout said:
On Sat, 12 Jan 2008 19:33:00 -0800, korsakow

No. The statement is passed to the server, which knows nothing about
Forms!...
Rather write something like:
="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName & "'"
Note the single-quotes around the text argument.

-Tom.

how have I to make the workaround with: dbo.PRO_GEBRUIKER and the parameter:
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]?
Is this correct?: - "exec dbo.PRO_GEBRUIKER
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]" -

thanks a lot!

:

On Sat, 12 Jan 2008 17:46:02 -0800, korsakow

From your reference to SQL 2005 I take it you are using ADP? If so,
take a look at the issues I posted a while back:
http://groups.google.com/groups?as_q="adp+in+a2007+runtime"

Unfortunately they remain unfixed. It very much looks like MSFT has
given up on ADP, at least in the runtime environment.

-Tom.


Just getting into access 2007 runtimes and am having a problem with opening
forms when passing parameters from one form to another. We have a main menu
and the user selects a facility then if they click on another button, it
opens another form which the data source for that form is an sql 2005 stored
procedures and the parameter being passed to it is a field off the main menu.
This worked fine in 2000 runtime and it works fine if you have full version
on access 2007 installed but not in runtime. We get an error "Bad query
parameter '@Facility'.
Thanks,
 
T

Tom van Stiphout

On Sun, 13 Jan 2008 16:32:01 -0800, korsakow

I do speak Dutch - just not very familiar with new words like
scheidingsteken. But I do get the gist of it.

Upon some further investigation indeed my first suggestion does not
work. Rather the RecordSource should be:
exec dbo.PRO_GEBRUIKER 'SomeUser'

To set that, you can use an event procedure (e.g. Form_Open) or a
button-click event or some such.

It is too bad MSFT didn't fix the problems in ADP runtime, otherwise
you would have been able to use the InputParameters property (which
still works in the full version). Personally I am disgusted about
this lack of support. I would be OK if MSFT would come out and say
they don't support ADP anymore and would encourage people to move on.
But this half-ass attitude...

-Tom.


so, I typ in the RecordSource property everything between - - ?
- ="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName] & "'" -
if I do this, I get the follow error in dutch: Kan voor de tekenreeks vanaf
positie 43 in de opdracht geen afsluitend scheidingsteken vinden. De
tekenreeks begint met: "PRO_GEBRUIKER txt='''''.
in english: can't find closing separation sign for the string as from
position 43 in the task. The string begins with: "PRO_GEBRUIKER txt='''''.

Tom van Stiphout said:
On Sat, 12 Jan 2008 19:33:00 -0800, korsakow

No. The statement is passed to the server, which knows nothing about
Forms!...
Rather write something like:
="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName & "'"
Note the single-quotes around the text argument.

-Tom.

how have I to make the workaround with: dbo.PRO_GEBRUIKER and the parameter:
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]?
Is this correct?: - "exec dbo.PRO_GEBRUIKER
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]" -

thanks a lot!

:

On Sat, 12 Jan 2008 17:46:02 -0800, korsakow

From your reference to SQL 2005 I take it you are using ADP? If so,
take a look at the issues I posted a while back:
http://groups.google.com/groups?as_q="adp+in+a2007+runtime"

Unfortunately they remain unfixed. It very much looks like MSFT has
given up on ADP, at least in the runtime environment.

-Tom.


Just getting into access 2007 runtimes and am having a problem with opening
forms when passing parameters from one form to another. We have a main menu
and the user selects a facility then if they click on another button, it
opens another form which the data source for that form is an sql 2005 stored
procedures and the parameter being passed to it is a field off the main menu.
This worked fine in 2000 runtime and it works fine if you have full version
on access 2007 installed but not in runtime. We get an error "Bad query
parameter '@Facility'.
Thanks,
 
K

korsakow

first of all: thanks for spending you time to my problem!

I don't understand: Rather the RecordSource should be:
exec dbo.PRO_GEBRUIKER 'SomeUser' : what is 'some user'?
I need to use the parameter @txt, because I can't make a query for each user
and I have also other query with query parrameters.

Tom van Stiphout said:
On Sun, 13 Jan 2008 16:32:01 -0800, korsakow

I do speak Dutch - just not very familiar with new words like
scheidingsteken. But I do get the gist of it.

Upon some further investigation indeed my first suggestion does not
work. Rather the RecordSource should be:
exec dbo.PRO_GEBRUIKER 'SomeUser'

To set that, you can use an event procedure (e.g. Form_Open) or a
button-click event or some such.

It is too bad MSFT didn't fix the problems in ADP runtime, otherwise
you would have been able to use the InputParameters property (which
still works in the full version). Personally I am disgusted about
this lack of support. I would be OK if MSFT would come out and say
they don't support ADP anymore and would encourage people to move on.
But this half-ass attitude...

-Tom.


so, I typ in the RecordSource property everything between - - ?
- ="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName] & "'" -
if I do this, I get the follow error in dutch: Kan voor de tekenreeks vanaf
positie 43 in de opdracht geen afsluitend scheidingsteken vinden. De
tekenreeks begint met: "PRO_GEBRUIKER txt='''''.
in english: can't find closing separation sign for the string as from
position 43 in the task. The string begins with: "PRO_GEBRUIKER txt='''''.

Tom van Stiphout said:
On Sat, 12 Jan 2008 19:33:00 -0800, korsakow

No. The statement is passed to the server, which knows nothing about
Forms!...
Rather write something like:
="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName & "'"
Note the single-quotes around the text argument.

-Tom.


how have I to make the workaround with: dbo.PRO_GEBRUIKER and the parameter:
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]?
Is this correct?: - "exec dbo.PRO_GEBRUIKER
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]" -

thanks a lot!

:

On Sat, 12 Jan 2008 17:46:02 -0800, korsakow

From your reference to SQL 2005 I take it you are using ADP? If so,
take a look at the issues I posted a while back:
http://groups.google.com/groups?as_q="adp+in+a2007+runtime"

Unfortunately they remain unfixed. It very much looks like MSFT has
given up on ADP, at least in the runtime environment.

-Tom.


Just getting into access 2007 runtimes and am having a problem with opening
forms when passing parameters from one form to another. We have a main menu
and the user selects a facility then if they click on another button, it
opens another form which the data source for that form is an sql 2005 stored
procedures and the parameter being passed to it is a field off the main menu.
This worked fine in 2000 runtime and it works fine if you have full version
on access 2007 installed but not in runtime. We get an error "Bad query
parameter '@Facility'.
Thanks,
 
T

Tom van Stiphout

On Sun, 13 Jan 2008 19:45:01 -0800, korsakow

'SomeUser' is just a placeholder for some username that presumably
you'd want to pass into your sproc.
If you use an appropriate event (and I have to be this vague because I
don't know your app) you can set and set again as many times as you
need the RecordSource property of the form you are speaking of.

-Tom.

first of all: thanks for spending you time to my problem!

I don't understand: Rather the RecordSource should be:
exec dbo.PRO_GEBRUIKER 'SomeUser' : what is 'some user'?
I need to use the parameter @txt, because I can't make a query for each user
and I have also other query with query parrameters.

Tom van Stiphout said:
On Sun, 13 Jan 2008 16:32:01 -0800, korsakow

I do speak Dutch - just not very familiar with new words like
scheidingsteken. But I do get the gist of it.

Upon some further investigation indeed my first suggestion does not
work. Rather the RecordSource should be:
exec dbo.PRO_GEBRUIKER 'SomeUser'

To set that, you can use an event procedure (e.g. Form_Open) or a
button-click event or some such.

It is too bad MSFT didn't fix the problems in ADP runtime, otherwise
you would have been able to use the InputParameters property (which
still works in the full version). Personally I am disgusted about
this lack of support. I would be OK if MSFT would come out and say
they don't support ADP anymore and would encourage people to move on.
But this half-ass attitude...

-Tom.


so, I typ in the RecordSource property everything between - - ?
- ="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName] & "'" -
if I do this, I get the follow error in dutch: Kan voor de tekenreeks vanaf
positie 43 in de opdracht geen afsluitend scheidingsteken vinden. De
tekenreeks begint met: "PRO_GEBRUIKER txt='''''.
in english: can't find closing separation sign for the string as from
position 43 in the task. The string begins with: "PRO_GEBRUIKER txt='''''.

:

On Sat, 12 Jan 2008 19:33:00 -0800, korsakow

No. The statement is passed to the server, which knows nothing about
Forms!...
Rather write something like:
="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName & "'"
Note the single-quotes around the text argument.

-Tom.


how have I to make the workaround with: dbo.PRO_GEBRUIKER and the parameter:
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]?
Is this correct?: - "exec dbo.PRO_GEBRUIKER
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]" -

thanks a lot!

:

On Sat, 12 Jan 2008 17:46:02 -0800, korsakow

From your reference to SQL 2005 I take it you are using ADP? If so,
take a look at the issues I posted a while back:
http://groups.google.com/groups?as_q="adp+in+a2007+runtime"

Unfortunately they remain unfixed. It very much looks like MSFT has
given up on ADP, at least in the runtime environment.

-Tom.


Just getting into access 2007 runtimes and am having a problem with opening
forms when passing parameters from one form to another. We have a main menu
and the user selects a facility then if they click on another button, it
opens another form which the data source for that form is an sql 2005 stored
procedures and the parameter being passed to it is a field off the main menu.
This worked fine in 2000 runtime and it works fine if you have full version
on access 2007 installed but not in runtime. We get an error "Bad query
parameter '@Facility'.
Thanks,
 
K

korsakow

I'm so sorry, but I don't understand you, I'll make is as simple as possible:
I have a simpel table. The query 'pro_gebruiker' has 1 field filtered bij
@txt.
@txt is on : [forms]![FRM_GEBRUIKER]![txtGetUserName].
the record source for FRM_1 is pro_gebruiker, so how/where can I add the
query parameter @txt? Do I have to make a vba code that execute on an
appropriate event, that add this parameter?

Please can you explain it step by step? But if it take to much time for you,
I'll understand that!
this stupid access runtime...
thanks a lot!

Tom van Stiphout said:
On Sun, 13 Jan 2008 19:45:01 -0800, korsakow

'SomeUser' is just a placeholder for some username that presumably
you'd want to pass into your sproc.
If you use an appropriate event (and I have to be this vague because I
don't know your app) you can set and set again as many times as you
need the RecordSource property of the form you are speaking of.

-Tom.

first of all: thanks for spending you time to my problem!

I don't understand: Rather the RecordSource should be:
exec dbo.PRO_GEBRUIKER 'SomeUser' : what is 'some user'?
I need to use the parameter @txt, because I can't make a query for each user
and I have also other query with query parrameters.

Tom van Stiphout said:
On Sun, 13 Jan 2008 16:32:01 -0800, korsakow

I do speak Dutch - just not very familiar with new words like
scheidingsteken. But I do get the gist of it.

Upon some further investigation indeed my first suggestion does not
work. Rather the RecordSource should be:
exec dbo.PRO_GEBRUIKER 'SomeUser'

To set that, you can use an event procedure (e.g. Form_Open) or a
button-click event or some such.

It is too bad MSFT didn't fix the problems in ADP runtime, otherwise
you would have been able to use the InputParameters property (which
still works in the full version). Personally I am disgusted about
this lack of support. I would be OK if MSFT would come out and say
they don't support ADP anymore and would encourage people to move on.
But this half-ass attitude...

-Tom.



so, I typ in the RecordSource property everything between - - ?
- ="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName] & "'" -
if I do this, I get the follow error in dutch: Kan voor de tekenreeks vanaf
positie 43 in de opdracht geen afsluitend scheidingsteken vinden. De
tekenreeks begint met: "PRO_GEBRUIKER txt='''''.
in english: can't find closing separation sign for the string as from
position 43 in the task. The string begins with: "PRO_GEBRUIKER txt='''''.

:

On Sat, 12 Jan 2008 19:33:00 -0800, korsakow

No. The statement is passed to the server, which knows nothing about
Forms!...
Rather write something like:
="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName & "'"
Note the single-quotes around the text argument.

-Tom.


how have I to make the workaround with: dbo.PRO_GEBRUIKER and the parameter:
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]?
Is this correct?: - "exec dbo.PRO_GEBRUIKER
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]" -

thanks a lot!

:

On Sat, 12 Jan 2008 17:46:02 -0800, korsakow

From your reference to SQL 2005 I take it you are using ADP? If so,
take a look at the issues I posted a while back:
http://groups.google.com/groups?as_q="adp+in+a2007+runtime"

Unfortunately they remain unfixed. It very much looks like MSFT has
given up on ADP, at least in the runtime environment.

-Tom.


Just getting into access 2007 runtimes and am having a problem with opening
forms when passing parameters from one form to another. We have a main menu
and the user selects a facility then if they click on another button, it
opens another form which the data source for that form is an sql 2005 stored
procedures and the parameter being passed to it is a field off the main menu.
This worked fine in 2000 runtime and it works fine if you have full version
on access 2007 installed but not in runtime. We get an error "Bad query
parameter '@Facility'.
Thanks,
 
T

Tom van Stiphout

On Sun, 13 Jan 2008 21:01:01 -0800, korsakow

You may have to read up a bit on how to call sprocs. @txt is an
argument, but you don't have to specify it. So these are equivalent:
exec dbo.PRO_GEBRUIKER 'SomeUser'
exec dbo.PRO_GEBRUIKER @txt='SomeUser'

Yes, as I wrote, you have to write some VBA to set the RecordSource.
You write this code in "...the appropriate event...". Something like:
Me.RecordSource = "exec dbo.PRO_GEBRUIKER '" &
[forms]![FRM_GEBRUIKER]![txtGetUserName] & "'"

That's all I have to say about this.

-Tom.


I'm so sorry, but I don't understand you, I'll make is as simple as possible:
I have a simpel table. The query 'pro_gebruiker' has 1 field filtered bij
@txt.
@txt is on : [forms]![FRM_GEBRUIKER]![txtGetUserName].
the record source for FRM_1 is pro_gebruiker, so how/where can I add the
query parameter @txt? Do I have to make a vba code that execute on an
appropriate event, that add this parameter?

Please can you explain it step by step? But if it take to much time for you,
I'll understand that!
this stupid access runtime...
thanks a lot!

Tom van Stiphout said:
On Sun, 13 Jan 2008 19:45:01 -0800, korsakow

'SomeUser' is just a placeholder for some username that presumably
you'd want to pass into your sproc.
If you use an appropriate event (and I have to be this vague because I
don't know your app) you can set and set again as many times as you
need the RecordSource property of the form you are speaking of.

-Tom.

first of all: thanks for spending you time to my problem!

I don't understand: Rather the RecordSource should be:
exec dbo.PRO_GEBRUIKER 'SomeUser' : what is 'some user'?
I need to use the parameter @txt, because I can't make a query for each user
and I have also other query with query parrameters.

:

On Sun, 13 Jan 2008 16:32:01 -0800, korsakow

I do speak Dutch - just not very familiar with new words like
scheidingsteken. But I do get the gist of it.

Upon some further investigation indeed my first suggestion does not
work. Rather the RecordSource should be:
exec dbo.PRO_GEBRUIKER 'SomeUser'

To set that, you can use an event procedure (e.g. Form_Open) or a
button-click event or some such.

It is too bad MSFT didn't fix the problems in ADP runtime, otherwise
you would have been able to use the InputParameters property (which
still works in the full version). Personally I am disgusted about
this lack of support. I would be OK if MSFT would come out and say
they don't support ADP anymore and would encourage people to move on.
But this half-ass attitude...

-Tom.



so, I typ in the RecordSource property everything between - - ?
- ="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName] & "'" -
if I do this, I get the follow error in dutch: Kan voor de tekenreeks vanaf
positie 43 in de opdracht geen afsluitend scheidingsteken vinden. De
tekenreeks begint met: "PRO_GEBRUIKER txt='''''.
in english: can't find closing separation sign for the string as from
position 43 in the task. The string begins with: "PRO_GEBRUIKER txt='''''.

:

On Sat, 12 Jan 2008 19:33:00 -0800, korsakow

No. The statement is passed to the server, which knows nothing about
Forms!...
Rather write something like:
="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName & "'"
Note the single-quotes around the text argument.

-Tom.


how have I to make the workaround with: dbo.PRO_GEBRUIKER and the parameter:
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]?
Is this correct?: - "exec dbo.PRO_GEBRUIKER
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]" -

thanks a lot!

:

On Sat, 12 Jan 2008 17:46:02 -0800, korsakow

From your reference to SQL 2005 I take it you are using ADP? If so,
take a look at the issues I posted a while back:
http://groups.google.com/groups?as_q="adp+in+a2007+runtime"

Unfortunately they remain unfixed. It very much looks like MSFT has
given up on ADP, at least in the runtime environment.

-Tom.


Just getting into access 2007 runtimes and am having a problem with opening
forms when passing parameters from one form to another. We have a main menu
and the user selects a facility then if they click on another button, it
opens another form which the data source for that form is an sql 2005 stored
procedures and the parameter being passed to it is a field off the main menu.
This worked fine in 2000 runtime and it works fine if you have full version
on access 2007 installed but not in runtime. We get an error "Bad query
parameter '@Facility'.
Thanks,
 
K

korsakow

Super! It works great! THANKS A LOT!!
can you als give me an example of the code if i have multiple parameters?
example one parameter: Me.RecordSource = "exec dbo.PRO_GEBRUIKER '"
&[forms]![FRM_GEBRUIKER]![txtGetUserName] & "'"

Tom van Stiphout said:
On Sun, 13 Jan 2008 21:01:01 -0800, korsakow

You may have to read up a bit on how to call sprocs. @txt is an
argument, but you don't have to specify it. So these are equivalent:
exec dbo.PRO_GEBRUIKER 'SomeUser'
exec dbo.PRO_GEBRUIKER @txt='SomeUser'

Yes, as I wrote, you have to write some VBA to set the RecordSource.
You write this code in "...the appropriate event...". Something like:
Me.RecordSource = "exec dbo.PRO_GEBRUIKER '" &
[forms]![FRM_GEBRUIKER]![txtGetUserName] & "'"

That's all I have to say about this.

-Tom.


I'm so sorry, but I don't understand you, I'll make is as simple as possible:
I have a simpel table. The query 'pro_gebruiker' has 1 field filtered bij
@txt.
@txt is on : [forms]![FRM_GEBRUIKER]![txtGetUserName].
the record source for FRM_1 is pro_gebruiker, so how/where can I add the
query parameter @txt? Do I have to make a vba code that execute on an
appropriate event, that add this parameter?

Please can you explain it step by step? But if it take to much time for you,
I'll understand that!
this stupid access runtime...
thanks a lot!

Tom van Stiphout said:
On Sun, 13 Jan 2008 19:45:01 -0800, korsakow

'SomeUser' is just a placeholder for some username that presumably
you'd want to pass into your sproc.
If you use an appropriate event (and I have to be this vague because I
don't know your app) you can set and set again as many times as you
need the RecordSource property of the form you are speaking of.

-Tom.


first of all: thanks for spending you time to my problem!

I don't understand: Rather the RecordSource should be:
exec dbo.PRO_GEBRUIKER 'SomeUser' : what is 'some user'?
I need to use the parameter @txt, because I can't make a query for each user
and I have also other query with query parrameters.

:

On Sun, 13 Jan 2008 16:32:01 -0800, korsakow

I do speak Dutch - just not very familiar with new words like
scheidingsteken. But I do get the gist of it.

Upon some further investigation indeed my first suggestion does not
work. Rather the RecordSource should be:
exec dbo.PRO_GEBRUIKER 'SomeUser'

To set that, you can use an event procedure (e.g. Form_Open) or a
button-click event or some such.

It is too bad MSFT didn't fix the problems in ADP runtime, otherwise
you would have been able to use the InputParameters property (which
still works in the full version). Personally I am disgusted about
this lack of support. I would be OK if MSFT would come out and say
they don't support ADP anymore and would encourage people to move on.
But this half-ass attitude...

-Tom.



so, I typ in the RecordSource property everything between - - ?
- ="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName] & "'" -
if I do this, I get the follow error in dutch: Kan voor de tekenreeks vanaf
positie 43 in de opdracht geen afsluitend scheidingsteken vinden. De
tekenreeks begint met: "PRO_GEBRUIKER txt='''''.
in english: can't find closing separation sign for the string as from
position 43 in the task. The string begins with: "PRO_GEBRUIKER txt='''''.

:

On Sat, 12 Jan 2008 19:33:00 -0800, korsakow

No. The statement is passed to the server, which knows nothing about
Forms!...
Rather write something like:
="exec dbo.PRO_GEBRUIKER @txt='" &
[forms]![FRM_GEBRUIKER]![txtGetUserName & "'"
Note the single-quotes around the text argument.

-Tom.


how have I to make the workaround with: dbo.PRO_GEBRUIKER and the parameter:
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]?
Is this correct?: - "exec dbo.PRO_GEBRUIKER
@txt=[forms]![FRM_GEBRUIKER]![txtGetUserName]" -

thanks a lot!

:

On Sat, 12 Jan 2008 17:46:02 -0800, korsakow

From your reference to SQL 2005 I take it you are using ADP? If so,
take a look at the issues I posted a while back:
http://groups.google.com/groups?as_q="adp+in+a2007+runtime"

Unfortunately they remain unfixed. It very much looks like MSFT has
given up on ADP, at least in the runtime environment.

-Tom.


Just getting into access 2007 runtimes and am having a problem with opening
forms when passing parameters from one form to another. We have a main menu
and the user selects a facility then if they click on another button, it
opens another form which the data source for that form is an sql 2005 stored
procedures and the parameter being passed to it is a field off the main menu.
This worked fine in 2000 runtime and it works fine if you have full version
on access 2007 installed but not in runtime. We get an error "Bad query
parameter '@Facility'.
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