InputParameter form property in VB

J

Jocelyn Kadach

Hello,
This is a question that applies to an Access .adp (2003) project:

I have a list(in FormA) that uses a stored procedure with parameters as row
source.
The list has a double-click event for opening another form. (FormB)

The InputParameters property in the form that gets opened (FormB) has
a reference to the first list that I created. Form B InputProperty looks
like this:

PersonId INT = forms!frmA!lstSearchClientbyIDNo1

This works fine.

Now, I have created a second list in FormA, which has its own stored
procedures
with parameters, as record source. This list will also need to open FormB.

I need help in writing the correct syntax inv VB for setting the
inputparameter to open Formb,
by either executing the double click event behind the first
(lstSearchClientbyIDNo1)
or second list (lstSearchClientbyIDNo2).

The function or subprocedure for the first list (lstSearchClientbyIDNo1) in
vb, needs to
set the input parameter property for FormB -- so it references to the
control name for my first list (ie., PersonId INT =
forms!frmA!lstSearchClientbyIDNo1)

Then the function or subprocedure for the second list
(lstSearchClientbyIDNo2) in vb, needs to
set the input parameter property for FormB -- so it references to the
control name for my second list (ie., PersonId INT =
forms!frmA!lstSearchClientbyIDNo2)

The syntax for VB to set the reference for the input parameter that I had
tried
doesn't work.. Please help!

Thanks so much for your kind assistance.
 
S

Sam Hobbs

Whenever possible, it helps to put the "bottom line" at the top. That is,
people often put the question at the end instead of at the beginning. It
helps to have a concise description of what is being asked at the beginning,
as much as is possible. Sometimes it is necessary to provide some
explanation first, but it helps to provide the explanation later followed by
a more detailed description of the problem.

I know it is often difficult to know how much of an explanation to provide.
If you provide too much explanation, the question is likely ignored. It has
happened to me. So I hope you won't mind me identifying some of the
explanations that might cause this to be ignored. See inline.


Jocelyn Kadach said:
I have a list(in FormA) that uses a stored procedure with parameters as
row
source.
The list has a double-click event for opening another form. (FormB)

First, the term "list" is generic and therefore it might not be clear what a
list is. Do you mean listbox? Or listview? If neither of those, then it is
probably necessary to be more specific.
The InputParameters property in the form that gets opened (FormB) has
a reference to the first list that I created. Form B InputProperty looks
like this:

PersonId INT = forms!frmA!lstSearchClientbyIDNo1

This works fine.

I am not an Access expert, but I don't know what "InputProperty" is. I
searched all of the MSDN and did not find it either. So perhaps it needs
clarification too.
Now, I have created a second list in FormA, which has its own stored
procedures
with parameters, as record source. This list will also need to open FormB.

Are you asking how to open FormB? If not, then perhaps it is confusing to
say this. I don't know; perhpas if I were more familiar with Access I would
know how this is important to the description of the problem.
I need help in writing the correct syntax inv VB for setting the
inputparameter to open Formb,
by either executing the double click event behind the first
(lstSearchClientbyIDNo1)
or second list (lstSearchClientbyIDNo2).

Are you asking how to write a double-click event handler? Are you asking how
to open Formb? If you are only asking for help with the syntax to pass an
inputparameter to Formb, and if that syntax is the same regardless of
whether it is in a double-click event handler and regardless of what
double-click event handler it is in, then some of that is extraneous.
The function or subprocedure for the first list (lstSearchClientbyIDNo1)
in
vb,

What function or subprocedure? Do you mean the double-click event handler?
needs to
set the input parameter property for FormB -- so it references to the
control name for my first list (ie., PersonId INT =
forms!frmA!lstSearchClientbyIDNo1)

Is that the same as what was said above?
Then the function or subprocedure for the second list
(lstSearchClientbyIDNo2) in vb, needs to
set the input parameter property for FormB -- so it references to the
control name for my second list (ie., PersonId INT =
forms!frmA!lstSearchClientbyIDNo2)

Again, it might not be clear what function or subprocedure you mean. Perhaps
others understand and if so then it might not be necessary to explain but it
is unclear to me. Also, it is not clear if this says anything more than what
had already been said.
 
J

Jocelyn Kadach

This is an attempt to clarify the problem in my previous post. [This is a
question for experts in access project (.adp format) and perhaps ADO
programming:]

I'm looking for help in how to set the InputParameters property by using
Visual Basic.

As mentioned in my previous post, I have currently set the InputParameters
property (in FormB), using FormB's property sheet, to create a reference to
the list box control in (FormA), so that the system passes the current value
from FormA's list box control to the SQL statement in FormB's RecourdSource
(select statement.. ie., SELECT * FROM table WHERE Column = ?)

The InputParameter property in FormB, currently set in property sheet, looks
like this:
PersonId INT = forms!frmA!lstSearchClientbyID

The list box control in FormA (forms!frmA!lstSearchClientbyID) uses a stored
procedure with parameters as row source. This list box has a double click
event sub-procedure (in VB) for opening FormB.

I added a second list box control (in FormA) that also uses a stored
procedured as row source. This second list box also has a double-click event
sub-procedure for opening FormB.

Now that I have multiple list box controls in FormA, I'd like to set the
InputParameters property in Visual Basic (behind a double-click event for
each list box control in Form A), so the references in FormB can handle
multiple parameters/references dynamically.

Thanks very much for your help and patience with my question.
 

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