Setting a criteria to lookup from a table.

S

Surrealdogma

I want my query to show me only those records in a table with a certin name.
The [Client Name] field on the table project info table is set to look up
from the Clients table so the other people using my database only have to
select the correct client. My query pulls from that and in the criteria
section for [Client Name] in the query I have entered [Enter Client Name] so
that when the query is run the window pops up. I want the window to lookup
the same list so that the users don't have to actually type but can just
select from a dropdown box. Clear as mud?

Thanks for you help!
 
J

Jason Lepack

I want my query to show me only those records in a table with a certin name.
The [Client Name] field on the table project info table is set to look up
from the Clients table so the other people using my database only have to
select the correct client. My query pulls from that and in the criteria
section for [Client Name] in the query I have entered [Enter Client Name] so
that when the query is run the window pops up. I want the window to lookup
the same list so that the users don't have to actually type but can just
select from a dropdown box. Clear as mud?

Thanks for you help!

Create a form we'll call form1. Put a combo box, we'll call it
combo1, on it that contains the values from the [Client Name] field.
In your query, instead of [Enter Client Name] you would put [Forms].
[form1].[combo1].

Ta da!

Cheers,
Jason Lepack
 
S

Surrealdogma

When I run my query the "Enter Parameter Value" window pops up uut instead of
Enter Client Name is is saying Forms.form1.combo1... What am I doing wrong?


Jason Lepack said:
I want my query to show me only those records in a table with a certin name.
The [Client Name] field on the table project info table is set to look up
from the Clients table so the other people using my database only have to
select the correct client. My query pulls from that and in the criteria
section for [Client Name] in the query I have entered [Enter Client Name] so
that when the query is run the window pops up. I want the window to lookup
the same list so that the users don't have to actually type but can just
select from a dropdown box. Clear as mud?

Thanks for you help!

Create a form we'll call form1. Put a combo box, we'll call it
combo1, on it that contains the values from the [Client Name] field.
In your query, instead of [Enter Client Name] you would put [Forms].
[form1].[combo1].

Ta da!

Cheers,
Jason Lepack
 
J

Jason Lepack

Is your form called "form1"?
Is your combobox called "combo1"?

When I run my query the "Enter Parameter Value" window pops up uut instead of
Enter Client Name is is saying Forms.form1.combo1... What am I doing wrong?



Jason Lepack said:
I want my query to show me only those records in a table with a certin name.
The [Client Name] field on the table project info table is set to look up
from the Clients table so the other people using my database only have to
select the correct client. My query pulls from that and in the criteria
section for [Client Name] in the query I have entered [Enter Client Name] so
that when the query is run the window pops up. I want the window to lookup
the same list so that the users don't have to actually type but can just
select from a dropdown box. Clear as mud?
Thanks for you help!
Create a form we'll call form1. Put a combo box, we'll call it
combo1, on it that contains the values from the [Client Name] field.
In your query, instead of [Enter Client Name] you would put [Forms].
[form1].[combo1].
Cheers,
Jason Lepack- Hide quoted text -

- Show quoted text -
 
S

Surrealdogma

Yes I called the form "form1" and the combobox "combo1"

Jason Lepack said:
Is your form called "form1"?
Is your combobox called "combo1"?

When I run my query the "Enter Parameter Value" window pops up uut instead of
Enter Client Name is is saying Forms.form1.combo1... What am I doing wrong?



Jason Lepack said:
On Feb 9, 12:48 pm, Surrealdogma
I want my query to show me only those records in a table with a certin name.
The [Client Name] field on the table project info table is set to look up
from the Clients table so the other people using my database only have to
select the correct client. My query pulls from that and in the criteria
section for [Client Name] in the query I have entered [Enter Client Name] so
that when the query is run the window pops up. I want the window to lookup
the same list so that the users don't have to actually type but can just
select from a dropdown box. Clear as mud?
Thanks for you help!
Create a form we'll call form1. Put a combo box, we'll call it
combo1, on it that contains the values from the [Client Name] field.
In your query, instead of [Enter Client Name] you would put [Forms].
[form1].[combo1].
Cheers,
Jason Lepack- Hide quoted text -

- Show quoted text -
 
C

ChristineN.

I also tried this and got the same result.. the Forms.form1.combo1
Surrealdogma said:
Yes I called the form "form1" and the combobox "combo1"

Jason Lepack said:
Is your form called "form1"?
Is your combobox called "combo1"?

When I run my query the "Enter Parameter Value" window pops up uut instead of
Enter Client Name is is saying Forms.form1.combo1... What am I doing wrong?



:
On Feb 9, 12:48 pm, Surrealdogma
I want my query to show me only those records in a table with a certin name.
The [Client Name] field on the table project info table is set to look up
from the Clients table so the other people using my database only have to
select the correct client. My query pulls from that and in the criteria
section for [Client Name] in the query I have entered [Enter Client Name] so
that when the query is run the window pops up. I want the window to lookup
the same list so that the users don't have to actually type but can just
select from a dropdown box. Clear as mud?

Thanks for you help!

Create a form we'll call form1. Put a combo box, we'll call it
combo1, on it that contains the values from the [Client Name] field.
In your query, instead of [Enter Client Name] you would put [Forms].
[form1].[combo1].

Ta da!

Cheers,
Jason Lepack- Hide quoted text -

- Show quoted text -
 
J

Jason Lepack

Post back with the SQL of your queries and I'll look at them.


I also tried this and got the same result.. the Forms.form1.combo1

Surrealdogma said:
Yes I called the form "form1" and the combobox "combo1"
Is your form called "form1"?
Is your combobox called "combo1"?
On Feb 9, 4:29 pm, Surrealdogma
When I run my query the "Enter Parameter Value" window pops up uut instead of
Enter Client Name is is saying Forms.form1.combo1... What am I doing wrong?
:
On Feb 9, 12:48 pm, Surrealdogma
I want my query to show me only those records in a table with a certin name.
The [Client Name] field on the table project info table is set to look up
from the Clients table so the other people using my database only have to
select the correct client. My query pulls from that and in the criteria
section for [Client Name] in the query I have entered [Enter Client Name] so
that when the query is run the window pops up. I want the window to lookup
the same list so that the users don't have to actually type but can just
select from a dropdown box. Clear as mud?
Thanks for you help!
Create a form we'll call form1. Put a combo box, we'll call it
combo1, on it that contains the values from the [Client Name] field.
In your query, instead of [Enter Client Name] you would put [Forms].
[form1].[combo1].
Ta da!
Cheers,
Jason Lepack- Hide quoted text -
- Show quoted text -
 
S

Surrealdogma

Thank you for all your help again.

SELECT [Project Information Query].[Client Name], [Project Information
Query].FYE, [Project Information Query].ID, [Project Information
Query].state1, [Project Information Query].state2, [Project Information
Query].[Provider Number], [Project Information Query].[Staff Assignment],
[Project Information Query].[Estimated Compleletion Date],
FROM [Project Information Query]
WHERE ((([Project Information Query].[Client
Name])=[Forms].[form1].[combo1]));


Jason Lepack said:
Post back with the SQL of your queries and I'll look at them.


I also tried this and got the same result.. the Forms.form1.combo1

Surrealdogma said:
Yes I called the form "form1" and the combobox "combo1"
"Jason Lepack" wrote:
Is your form called "form1"?
Is your combobox called "combo1"?
On Feb 9, 4:29 pm, Surrealdogma
When I run my query the "Enter Parameter Value" window pops up uut instead of
Enter Client Name is is saying Forms.form1.combo1... What am I doing wrong?
:
On Feb 9, 12:48 pm, Surrealdogma
I want my query to show me only those records in a table with a certin name.
The [Client Name] field on the table project info table is set to look up
from the Clients table so the other people using my database only have to
select the correct client. My query pulls from that and in the criteria
section for [Client Name] in the query I have entered [Enter Client Name] so
that when the query is run the window pops up. I want the window to lookup
the same list so that the users don't have to actually type but can just
select from a dropdown box. Clear as mud?
Thanks for you help!
Create a form we'll call form1. Put a combo box, we'll call it
combo1, on it that contains the values from the [Client Name] field.
In your query, instead of [Enter Client Name] you would put [Forms].
[form1].[combo1].
Cheers,
Jason Lepack- Hide quoted text -
- Show quoted text -
 
J

Jason Lepack

WHERE ((([Project Information Query].[Client
Name])=[Forms].[form1].[combo1]));

There's your problem.

I suspect that your combo box has two columns, the first one being
hidden. The first column is probably "client_id" or some equivalent
and the second column is the [client name]. Your query is pulling the
info from the combo box and instead of the query statement evaluating
to "[Client Name] = 'Bob Smith'" it's evaluating to "[Client Name] =
'1'" and therefore getting no records returned.

You have two options, you can add the client_id (or equivalent) into
your query and use that for the WHERE clause, or you can modify your
combo box. If you choose to modify your combo box then the relevant
fields that you will need to change are "Row Source" (Click the
ellipsis (...) and remove the client_id field), "Column Count" (Change
to 1), and "Column Width" (Remove the 0"; at the start)

Christine,
That's probably your problem too.

Cheers,
Jason Lepack

Thank you for all your help again.

SELECT [Project Information Query].[Client Name], [Project Information
Query].FYE, [Project Information Query].ID, [Project Information
Query].state1, [Project Information Query].state2, [Project Information
Query].[Provider Number], [Project Information Query].[Staff Assignment],
[Project Information Query].[Estimated Compleletion Date],
FROM [Project Information Query]
WHERE ((([Project Information Query].[Client
Name])=[Forms].[form1].[combo1]));



Jason Lepack said:
Post back with the SQL of your queries and I'll look at them.
I also tried this and got the same result.. the Forms.form1.combo1
:
Yes I called the form "form1" and the combobox "combo1"
:
Is your form called "form1"?
Is your combobox called "combo1"?
On Feb 9, 4:29 pm, Surrealdogma
When I run my query the "Enter Parameter Value" window pops up uut instead of
Enter Client Name is is saying Forms.form1.combo1... What am I doing wrong?
:
On Feb 9, 12:48 pm, Surrealdogma
I want my query to show me only those records in a table with a certin name.
The [Client Name] field on the table project info table is set to look up
from the Clients table so the other people using my database only have to
select the correct client. My query pulls from that and in the criteria
section for [Client Name] in the query I have entered [Enter Client Name] so
that when the query is run the window pops up. I want the window to lookup
the same list so that the users don't have to actually type but can just
select from a dropdown box. Clear as mud?
Thanks for you help!
Create a form we'll call form1. Put a combo box, we'll call it
combo1, on it that contains the values from the [Client Name] field.
In your query, instead of [Enter Client Name] you would put [Forms].
[form1].[combo1].
Ta da!
Cheers,
Jason Lepack- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -
 
S

Surrealdogma

I tried it both ways and I am getting the same result. When I run the query,
the window pops up

Title Bar = Enter Parameter Value
Forms.form1.combo1
little box to enter the value is not even showing as a dropdown box.
here is the SQL...

SELECT [Project Information Query].[Client Name], [Project Information
Query].FYE, [Project Information Query].ID, [Project Information
Query].state1, [Project Information Query].state2, [Project Information
Query].[Provider Number], [Project Information Query].[Staff Assignment],
[Project Information Query].[Estimated Compleletion Date]
FROM [Project Information Query]
WHERE ((([Project Information Query].[Client Name])=Forms.form1.combo1));



Jason Lepack said:
WHERE ((([Project Information Query].[Client
Name])=[Forms].[form1].[combo1]));

There's your problem.

I suspect that your combo box has two columns, the first one being
hidden. The first column is probably "client_id" or some equivalent
and the second column is the [client name]. Your query is pulling the
info from the combo box and instead of the query statement evaluating
to "[Client Name] = 'Bob Smith'" it's evaluating to "[Client Name] =
'1'" and therefore getting no records returned.

You have two options, you can add the client_id (or equivalent) into
your query and use that for the WHERE clause, or you can modify your
combo box. If you choose to modify your combo box then the relevant
fields that you will need to change are "Row Source" (Click the
ellipsis (...) and remove the client_id field), "Column Count" (Change
to 1), and "Column Width" (Remove the 0"; at the start)

Christine,
That's probably your problem too.

Cheers,
Jason Lepack

Thank you for all your help again.

SELECT [Project Information Query].[Client Name], [Project Information
Query].FYE, [Project Information Query].ID, [Project Information
Query].state1, [Project Information Query].state2, [Project Information
Query].[Provider Number], [Project Information Query].[Staff Assignment],
[Project Information Query].[Estimated Compleletion Date],
FROM [Project Information Query]
WHERE ((([Project Information Query].[Client
Name])=[Forms].[form1].[combo1]));



Jason Lepack said:
Post back with the SQL of your queries and I'll look at them.
On Feb 12, 3:35 pm, ChristineN. <[email protected]>
wrote:
I also tried this and got the same result.. the Forms.form1.combo1
:
Yes I called the form "form1" and the combobox "combo1"
"Jason Lepack" wrote:
Is your form called "form1"?
Is your combobox called "combo1"?
On Feb 9, 4:29 pm, Surrealdogma
When I run my query the "Enter Parameter Value" window pops up uut instead of
Enter Client Name is is saying Forms.form1.combo1... What am I doing wrong?
:
On Feb 9, 12:48 pm, Surrealdogma
I want my query to show me only those records in a table with a certin name.
The [Client Name] field on the table project info table is set to look up
from the Clients table so the other people using my database only have to
select the correct client. My query pulls from that and in the criteria
section for [Client Name] in the query I have entered [Enter Client Name] so
that when the query is run the window pops up. I want the window to lookup
the same list so that the users don't have to actually type but can just
select from a dropdown box. Clear as mud?
Thanks for you help!
Create a form we'll call form1. Put a combo box, we'll call it
combo1, on it that contains the values from the [Client Name] field.
In your query, instead of [Enter Client Name] you would put [Forms].
[form1].[combo1].
Cheers,
Jason Lepack- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -
 
J

Jason Lepack

Open the form. Select a value in the combo box. Now open your
query. That should do it.

Cheers,
Jason Lepack


I tried it both ways and I am getting the same result. When I run the query,
the window pops up

Title Bar = Enter Parameter Value
Forms.form1.combo1
little box to enter the value is not even showing as a dropdown box.
here is the SQL...

SELECT [Project Information Query].[Client Name], [Project Information
Query].FYE, [Project Information Query].ID, [Project Information
Query].state1, [Project Information Query].state2, [Project Information
Query].[Provider Number], [Project Information Query].[Staff Assignment],
[Project Information Query].[Estimated Compleletion Date]
FROM [Project Information Query]
WHERE ((([Project Information Query].[Client Name])=Forms.form1.combo1));



Jason Lepack said:
WHERE ((([Project Information Query].[Client
Name])=[Forms].[form1].[combo1]));
There's your problem.
I suspect that your combo box has two columns, the first one being
hidden. The first column is probably "client_id" or some equivalent
and the second column is the [client name]. Your query is pulling the
info from the combo box and instead of the query statement evaluating
to "[Client Name] = 'Bob Smith'" it's evaluating to "[Client Name] =
'1'" and therefore getting no records returned.
You have two options, you can add the client_id (or equivalent) into
your query and use that for the WHERE clause, or you can modify your
combo box. If you choose to modify your combo box then the relevant
fields that you will need to change are "Row Source" (Click the
ellipsis (...) and remove the client_id field), "Column Count" (Change
to 1), and "Column Width" (Remove the 0"; at the start)
Christine,
That's probably your problem too.
Cheers,
Jason Lepack
Thank you for all your help again.
SELECT [Project Information Query].[Client Name], [Project Information
Query].FYE, [Project Information Query].ID, [Project Information
Query].state1, [Project Information Query].state2, [Project Information
Query].[Provider Number], [Project Information Query].[Staff Assignment],
[Project Information Query].[Estimated Compleletion Date],
FROM [Project Information Query]
WHERE ((([Project Information Query].[Client
Name])=[Forms].[form1].[combo1]));
:
Post back with the SQL of your queries and I'll look at them.
On Feb 12, 3:35 pm, ChristineN. <[email protected]>
wrote:
I also tried this and got the same result.. the Forms.form1.combo1
:
Yes I called the form "form1" and the combobox "combo1"
:
Is your form called "form1"?
Is your combobox called "combo1"?
On Feb 9, 4:29 pm, Surrealdogma
When I run my query the "Enter Parameter Value" window pops up uut instead of
Enter Client Name is is saying Forms.form1.combo1... What am I doing wrong?
:
On Feb 9, 12:48 pm, Surrealdogma
I want my query to show me only those records in a table with a certin name.
The [Client Name] field on the table project info table is set to look up
from the Clients table so the other people using my database only have to
select the correct client. My query pulls from that and in the criteria
section for [Client Name] in the query I have entered [Enter Client Name] so
that when the query is run the window pops up. I want the window to lookup
the same list so that the users don't have to actually type but can just
select from a dropdown box. Clear as mud?
Thanks for you help!
Create a form we'll call form1. Put a combo box, we'll call it
combo1, on it that contains the values from the [Client Name] field.
In your query, instead of [Enter Client Name] you would put [Forms].
[form1].[combo1].
Ta da!
Cheers,
Jason Lepack- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -
 

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