Another Query by Form Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a report that On Open opens a form, the user selects a name
the On Update of the form then runs the query, populates the form and we have
what we want... not exactly! It is supposed to anyway. The form runs great,
the problem I'm having is that as soon as the query goes to run I get an
error. I've tracked the problem back to the query. If I just open the query
and try to enter the info in manually, I get the error. I believe the
problem to be this. The form is pulling names from a list. This list is
coming from a Table where I have these fields (in this order: ID, Name,ID
#,Email. The Combo is set up to have 2 columns, bound column 1, widths 0,1.
This way the user only sees the names. When I run the query by typing in a
name.... error occurs. When I run the query by typing in the number that
goes with the name... Bingo query runs perfect. So, my question is, how do I
get the query to recognize the name selected in teh form rather than wanting
the number accociated with it?

Thanks in advance for any help.
 
without seeing the code, i can only guess but it sounds
like you have the query criteria on the number and not the
name.
 
In the query criteria I have:

[Forms]![frmQueryforTeamLeaderreport]![Combo9]

I don't know how to set this to column 2. I experimented putting column(2)
behind [Combo9], but nothing I tried worked.

thanks

without seeing the code, i can only guess but it sounds
like you have the query criteria on the number and not the
name.
 
hi again,
what error do you get when you type in the name?
What field in the query do you have the criteria?
-----Original Message-----
In the query criteria I have:

[Forms]![frmQueryforTeamLeaderreport]![Combo9]

I don't know how to set this to column 2. I experimented putting column(2)
behind [Combo9], but nothing I tried worked.

thanks
 
"The expression you entered is typed incorrectly or is too complex to be be
evaluated" Now, I am typing in "David Allen". If I enter in "1" which is
the number that goes with David Allen the query runs fine.


hi again,
what error do you get when you type in the name?
What field in the query do you have the criteria?
-----Original Message-----
In the query criteria I have:

[Forms]![frmQueryforTeamLeaderreport]![Combo9]

I don't know how to set this to column 2. I experimented putting column(2)
behind [Combo9], but nothing I tried worked.

thanks

without seeing the code, i can only guess but it sounds
like you have the query criteria on the number and not the
name.

-----Original Message-----
I have created a report that On Open opens a form, the
user selects a name
the On Update of the form then runs the query, populates
the form and we have
what we want... not exactly! It is supposed to anyway.
The form runs great,
the problem I'm having is that as soon as the query goes
to run I get an
error. I've tracked the problem back to the query. If I
just open the query
and try to enter the info in manually, I get the error.
I believe the
problem to be this. The form is pulling names from a
list. This list is
coming from a Table where I have these fields (in this
order: ID, Name,ID
#,Email. The Combo is set up to have 2 columns, bound
column 1, widths 0,1.
This way the user only sees the names. When I run the
query by typing in a
name.... error occurs. When I run the query by typing in
the number that
goes with the name... Bingo query runs perfect. So, my
question is, how do I
get the query to recognize the name selected in teh form
rather than wanting
the number accociated with it?

Thanks in advance for any help.
.
 
The Column property is zero-based, meaning that the first column is
Column(0), the second column is Column(1), etc., so, as your combo box has
two columns, there is no Column(2) - that would be the third column, if
there was one. Combo9.Column(1) should do it.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


AJ said:
"The expression you entered is typed incorrectly or is too complex to be
be
evaluated" Now, I am typing in "David Allen". If I enter in "1" which
is
the number that goes with David Allen the query runs fine.


hi again,
what error do you get when you type in the name?
What field in the query do you have the criteria?
-----Original Message-----
In the query criteria I have:

[Forms]![frmQueryforTeamLeaderreport]![Combo9]

I don't know how to set this to column 2. I experimented putting column(2)
behind [Combo9], but nothing I tried worked.

thanks

:

without seeing the code, i can only guess but it sounds
like you have the query criteria on the number and not the
name.

-----Original Message-----
I have created a report that On Open opens a form, the
user selects a name
the On Update of the form then runs the query, populates
the form and we have
what we want... not exactly! It is supposed to anyway.
The form runs great,
the problem I'm having is that as soon as the query goes
to run I get an
error. I've tracked the problem back to the query. If I
just open the query
and try to enter the info in manually, I get the error.
I believe the
problem to be this. The form is pulling names from a
list. This list is
coming from a Table where I have these fields (in this
order: ID, Name,ID
#,Email. The Combo is set up to have 2 columns, bound
column 1, widths 0,1.
This way the user only sees the names. When I run the
query by typing in a
name.... error occurs. When I run the query by typing in
the number that
goes with the name... Bingo query runs perfect. So, my
question is, how do I
get the query to recognize the name selected in teh form
rather than wanting
the number accociated with it?

Thanks in advance for any help.
--
aj
.


.
 
What would be the syntax?

In the criteria slot on the query I have tried:

[Forms]![frmQueryforTeamLeaderreport]![Combo9.Column(1)] - I got a syntax
error

I tried [Forms]![frmQueryfor TeamLeaderreport]![Combo9].Column(1) - I got a
syntax error.

I just don't know the proper way to put this in.

thanks for your help.

Brendan Reynolds said:
The Column property is zero-based, meaning that the first column is
Column(0), the second column is Column(1), etc., so, as your combo box has
two columns, there is no Column(2) - that would be the third column, if
there was one. Combo9.Column(1) should do it.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


AJ said:
"The expression you entered is typed incorrectly or is too complex to be
be
evaluated" Now, I am typing in "David Allen". If I enter in "1" which
is
the number that goes with David Allen the query runs fine.


hi again,
what error do you get when you type in the name?
What field in the query do you have the criteria?

-----Original Message-----
In the query criteria I have:

[Forms]![frmQueryforTeamLeaderreport]![Combo9]

I don't know how to set this to column 2. I experimented
putting column(2)
behind [Combo9], but nothing I tried worked.

thanks

:

without seeing the code, i can only guess but it sounds
like you have the query criteria on the number and not
the
name.

-----Original Message-----
I have created a report that On Open opens a form, the
user selects a name
the On Update of the form then runs the query,
populates
the form and we have
what we want... not exactly! It is supposed to
anyway.
The form runs great,
the problem I'm having is that as soon as the query
goes
to run I get an
error. I've tracked the problem back to the query.
If I
just open the query
and try to enter the info in manually, I get the
error.
I believe the
problem to be this. The form is pulling names from a
list. This list is
coming from a Table where I have these fields (in this
order: ID, Name,ID
#,Email. The Combo is set up to have 2 columns, bound
column 1, widths 0,1.
This way the user only sees the names. When I run the
query by typing in a
name.... error occurs. When I run the query by typing
in
the number that
goes with the name... Bingo query runs perfect. So,
my
question is, how do I
get the query to recognize the name selected in teh
form
rather than wanting
the number accociated with it?

Thanks in advance for any help.
--
aj
.


.
 
Back
Top