continuous entry in combo box

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

Guest

How do I display the matching records in a combo box, everytime I hit a key
to continuosly enter enter the criteria?
 
I think the "reports to" field in the "employee" form of the Northwinds
database does what you want.

If you type the letter "D" then the list drops to the first name that starts
with a "D" (Davililo). If you then type an "O", it jumps to "Dodsworth".

Check out the Northwinds sample.

Rick B
 
This is turned on and off via the AutoExpand property of the combo box. It
should be turned on by default.
 
Autoexpand is turned on.

As I enter criteria continuously by character, I would like to see all the
matching records continuously. For example, if I enter a "d", I want to see
all the "d*" records. If the next key is an "a", then I want to see all the
"da*" records. Here is the sql for row source:

SELECT RONCHECK_access.*, [RONCHECK_access].[PAYEE] FROM RONCHECK_access
WHERE ((([RONCHECK_access].[PAYEE]) Like [enter payee]));

Because I'm using "Like [enter" another data entry window opens up. Is there
a simpler way of doing this without "Like [enter" that will also display all
the matching records continuously, as I enter criteria characters.

Thanks.
Graham Mandeno said:
This is turned on and off via the AutoExpand property of the combo box. It
should be turned on by default.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
How do I display the matching records in a combo box, everytime I hit a
key
to continuosly enter enter the criteria?
 
Can you not achieve what you want by dropping down the combo box when it
gets the focus? To do this, add a GetFocus event procedure with the line:
ComboBoxName.Dropdown.

You should not have an unresolved parameter ([enter payee])in your RowSource
query, otherwise it will always need to prompt you for the value.

If you want to list *only* the items in the list that match what you have
typed, then you're probably better off with a textbox and a listbox. Use
the Change event of the textbox to filter the listbox.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
Autoexpand is turned on.

As I enter criteria continuously by character, I would like to see all the
matching records continuously. For example, if I enter a "d", I want to
see
all the "d*" records. If the next key is an "a", then I want to see all
the
"da*" records. Here is the sql for row source:

SELECT RONCHECK_access.*, [RONCHECK_access].[PAYEE] FROM RONCHECK_access
WHERE ((([RONCHECK_access].[PAYEE]) Like [enter payee]));

Because I'm using "Like [enter" another data entry window opens up. Is
there
a simpler way of doing this without "Like [enter" that will also display
all
the matching records continuously, as I enter criteria characters.

Thanks.
Graham Mandeno said:
This is turned on and off via the AutoExpand property of the combo box.
It
should be turned on by default.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
How do I display the matching records in a combo box, everytime I hit a
key
to continuosly enter enter the criteria?
 
The combo box is still not displaying the records. Here's the code

Private Sub payto_DblClick(Cancel As Integer)
payto.Requery
End Sub

Private Sub payto_GotFocus()
payto.Dropdown
End Sub

In the row source I have
SELECT * FROM RONCHECK_access WHERE ([RONCHECK_access].[PAYEE]=payto);

I'm getting

"The text you entered isn't an item in the list". I beleive I am using some
properties icoreectly and/or my select statement is bad. payto is the current
combo box. Control source is PAYEE and rowsourcetype is table/query.
Autoexpand is yes.

Graham - Thanks for getting back to me.
Regards,
Len

Graham Mandeno said:
Can you not achieve what you want by dropping down the combo box when it
gets the focus? To do this, add a GetFocus event procedure with the line:
ComboBoxName.Dropdown.

You should not have an unresolved parameter ([enter payee])in your RowSource
query, otherwise it will always need to prompt you for the value.

If you want to list *only* the items in the list that match what you have
typed, then you're probably better off with a textbox and a listbox. Use
the Change event of the textbox to filter the listbox.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
Autoexpand is turned on.

As I enter criteria continuously by character, I would like to see all the
matching records continuously. For example, if I enter a "d", I want to
see
all the "d*" records. If the next key is an "a", then I want to see all
the
"da*" records. Here is the sql for row source:

SELECT RONCHECK_access.*, [RONCHECK_access].[PAYEE] FROM RONCHECK_access
WHERE ((([RONCHECK_access].[PAYEE]) Like [enter payee]));

Because I'm using "Like [enter" another data entry window opens up. Is
there
a simpler way of doing this without "Like [enter" that will also display
all
the matching records continuously, as I enter criteria characters.

Thanks.
Graham Mandeno said:
This is turned on and off via the AutoExpand property of the combo box.
It
should be turned on by default.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

How do I display the matching records in a combo box, everytime I hit a
key
to continuosly enter enter the criteria?
 
Hi Len
WHERE ([RONCHECK_access].[PAYEE]=payto);

You cannot refer to a control on a form this way in a SQL statement. If you
really want to filter the rowsource based on the value in a form control,
you need to fully specify the form and the control, because SQL is not
running in the scope of the form, and it will have no idea what "payto" is.
For example:
WHERE ([RONCHECK_access].[PAYEE]=Forms![YourFormName]!payto);

However, you are trying to specify the rowsource of a combo by filtering it
against the current value of that same combo. This means you will have a
"catch-22" situation where there's nothing in the list, because there's
nothing in the combo!!

I suggest you simply set the RowSource to:
SELECT * FROM RONCHECK_access ORDER BY PAYEE;

Leave the GotFocus event procedure as you have it.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


lendapilot said:
The combo box is still not displaying the records. Here's the code

Private Sub payto_DblClick(Cancel As Integer)
payto.Requery
End Sub

Private Sub payto_GotFocus()
payto.Dropdown
End Sub

In the row source I have
SELECT * FROM RONCHECK_access WHERE ([RONCHECK_access].[PAYEE]=payto);

I'm getting

"The text you entered isn't an item in the list". I beleive I am using
some
properties icoreectly and/or my select statement is bad. payto is the
current
combo box. Control source is PAYEE and rowsourcetype is table/query.
Autoexpand is yes.

Graham - Thanks for getting back to me.
Regards,
Len

Graham Mandeno said:
Can you not achieve what you want by dropping down the combo box when it
gets the focus? To do this, add a GetFocus event procedure with the
line:
ComboBoxName.Dropdown.

You should not have an unresolved parameter ([enter payee])in your
RowSource
query, otherwise it will always need to prompt you for the value.

If you want to list *only* the items in the list that match what you have
typed, then you're probably better off with a textbox and a listbox. Use
the Change event of the textbox to filter the listbox.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
Autoexpand is turned on.

As I enter criteria continuously by character, I would like to see all
the
matching records continuously. For example, if I enter a "d", I want to
see
all the "d*" records. If the next key is an "a", then I want to see
all
the
"da*" records. Here is the sql for row source:

SELECT RONCHECK_access.*, [RONCHECK_access].[PAYEE] FROM
RONCHECK_access
WHERE ((([RONCHECK_access].[PAYEE]) Like [enter payee]));

Because I'm using "Like [enter" another data entry window opens up. Is
there
a simpler way of doing this without "Like [enter" that will also
display
all
the matching records continuously, as I enter criteria characters.

Thanks.
:

This is turned on and off via the AutoExpand property of the combo
box.
It
should be turned on by default.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

How do I display the matching records in a combo box, everytime I
hit a
key
to continuosly enter enter the criteria?
 
Hi Graham,
You put me more on the right track but I'm still not getting any data in the
combo box.

The rowsource now is

SELECT * FROM RONCHECK_access WHERE (RONCHECK_access.DATE Between
#07/13/1992#
And #08/27/1992# And RONCHECK_access.PAYEE = Form![checks_dates_payee]!payto);

payto is another combo box where payee comes from. I may be having trouble
with the form name. If I click on form & properties, there is no name for the
form. Do I use the name from the Forms category?

Thanks again.
Regards,
Len


Graham Mandeno said:
Hi Len
WHERE ([RONCHECK_access].[PAYEE]=payto);

You cannot refer to a control on a form this way in a SQL statement. If you
really want to filter the rowsource based on the value in a form control,
you need to fully specify the form and the control, because SQL is not
running in the scope of the form, and it will have no idea what "payto" is.
For example:
WHERE ([RONCHECK_access].[PAYEE]=Forms![YourFormName]!payto);

However, you are trying to specify the rowsource of a combo by filtering it
against the current value of that same combo. This means you will have a
"catch-22" situation where there's nothing in the list, because there's
nothing in the combo!!

I suggest you simply set the RowSource to:
SELECT * FROM RONCHECK_access ORDER BY PAYEE;

Leave the GotFocus event procedure as you have it.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


lendapilot said:
The combo box is still not displaying the records. Here's the code

Private Sub payto_DblClick(Cancel As Integer)
payto.Requery
End Sub

Private Sub payto_GotFocus()
payto.Dropdown
End Sub

In the row source I have
SELECT * FROM RONCHECK_access WHERE ([RONCHECK_access].[PAYEE]=payto);

I'm getting

"The text you entered isn't an item in the list". I beleive I am using
some
properties icoreectly and/or my select statement is bad. payto is the
current
combo box. Control source is PAYEE and rowsourcetype is table/query.
Autoexpand is yes.

Graham - Thanks for getting back to me.
Regards,
Len

Graham Mandeno said:
Can you not achieve what you want by dropping down the combo box when it
gets the focus? To do this, add a GetFocus event procedure with the
line:
ComboBoxName.Dropdown.

You should not have an unresolved parameter ([enter payee])in your
RowSource
query, otherwise it will always need to prompt you for the value.

If you want to list *only* the items in the list that match what you have
typed, then you're probably better off with a textbox and a listbox. Use
the Change event of the textbox to filter the listbox.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Autoexpand is turned on.

As I enter criteria continuously by character, I would like to see all
the
matching records continuously. For example, if I enter a "d", I want to
see
all the "d*" records. If the next key is an "a", then I want to see
all
the
"da*" records. Here is the sql for row source:

SELECT RONCHECK_access.*, [RONCHECK_access].[PAYEE] FROM
RONCHECK_access
WHERE ((([RONCHECK_access].[PAYEE]) Like [enter payee]));

Because I'm using "Like [enter" another data entry window opens up. Is
there
a simpler way of doing this without "Like [enter" that will also
display
all
the matching records continuously, as I enter criteria characters.

Thanks.
:

This is turned on and off via the AutoExpand property of the combo
box.
It
should be turned on by default.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

How do I display the matching records in a combo box, everytime I
hit a
key
to continuosly enter enter the criteria?
 
Hi Len

If you copy that rowsource and paste it into the SQL view of a new query,
does the query return any records? Are there records in your table with
dates as far back as 1992?

--

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
Hi Graham,
You put me more on the right track but I'm still not getting any data in
the
combo box.

The rowsource now is

SELECT * FROM RONCHECK_access WHERE (RONCHECK_access.DATE Between
#07/13/1992#
And #08/27/1992# And RONCHECK_access.PAYEE =
Form![checks_dates_payee]!payto);

payto is another combo box where payee comes from. I may be having trouble
with the form name. If I click on form & properties, there is no name for
the
form. Do I use the name from the Forms category?

Thanks again.
Regards,
Len


Graham Mandeno said:
Hi Len
WHERE ([RONCHECK_access].[PAYEE]=payto);

You cannot refer to a control on a form this way in a SQL statement. If
you
really want to filter the rowsource based on the value in a form control,
you need to fully specify the form and the control, because SQL is not
running in the scope of the form, and it will have no idea what "payto"
is.
For example:
WHERE ([RONCHECK_access].[PAYEE]=Forms![YourFormName]!payto);

However, you are trying to specify the rowsource of a combo by filtering
it
against the current value of that same combo. This means you will have a
"catch-22" situation where there's nothing in the list, because there's
nothing in the combo!!

I suggest you simply set the RowSource to:
SELECT * FROM RONCHECK_access ORDER BY PAYEE;

Leave the GotFocus event procedure as you have it.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


lendapilot said:
The combo box is still not displaying the records. Here's the code

Private Sub payto_DblClick(Cancel As Integer)
payto.Requery
End Sub

Private Sub payto_GotFocus()
payto.Dropdown
End Sub

In the row source I have
SELECT * FROM RONCHECK_access WHERE ([RONCHECK_access].[PAYEE]=payto);

I'm getting

"The text you entered isn't an item in the list". I beleive I am using
some
properties icoreectly and/or my select statement is bad. payto is the
current
combo box. Control source is PAYEE and rowsourcetype is table/query.
Autoexpand is yes.

Graham - Thanks for getting back to me.
Regards,
Len

:

Can you not achieve what you want by dropping down the combo box when
it
gets the focus? To do this, add a GetFocus event procedure with the
line:
ComboBoxName.Dropdown.

You should not have an unresolved parameter ([enter payee])in your
RowSource
query, otherwise it will always need to prompt you for the value.

If you want to list *only* the items in the list that match what you
have
typed, then you're probably better off with a textbox and a listbox.
Use
the Change event of the textbox to filter the listbox.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Autoexpand is turned on.

As I enter criteria continuously by character, I would like to see
all
the
matching records continuously. For example, if I enter a "d", I want
to
see
all the "d*" records. If the next key is an "a", then I want to see
all
the
"da*" records. Here is the sql for row source:

SELECT RONCHECK_access.*, [RONCHECK_access].[PAYEE] FROM
RONCHECK_access
WHERE ((([RONCHECK_access].[PAYEE]) Like [enter payee]));

Because I'm using "Like [enter" another data entry window opens up.
Is
there
a simpler way of doing this without "Like [enter" that will also
display
all
the matching records continuously, as I enter criteria characters.

Thanks.
:

This is turned on and off via the AutoExpand property of the combo
box.
It
should be turned on by default.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
How do I display the matching records in a combo box, everytime I
hit a
key
to continuosly enter enter the criteria?
 
There is data from 1992. I can't use the result of a paste because the payto
value doesn't fill into the rowsource query. I think the rowsource query
isn't working because I don't have the right form name in
Form![checks_dates_payee]!payto .Thanks.

Graham Mandeno said:
Hi Len

If you copy that rowsource and paste it into the SQL view of a new query,
does the query return any records? Are there records in your table with
dates as far back as 1992?

--

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
Hi Graham,
You put me more on the right track but I'm still not getting any data in
the
combo box.

The rowsource now is

SELECT * FROM RONCHECK_access WHERE (RONCHECK_access.DATE Between
#07/13/1992#
And #08/27/1992# And RONCHECK_access.PAYEE =
Form![checks_dates_payee]!payto);

payto is another combo box where payee comes from. I may be having trouble
with the form name. If I click on form & properties, there is no name for
the
form. Do I use the name from the Forms category?

Thanks again.
Regards,
Len


Graham Mandeno said:
Hi Len

WHERE ([RONCHECK_access].[PAYEE]=payto);

You cannot refer to a control on a form this way in a SQL statement. If
you
really want to filter the rowsource based on the value in a form control,
you need to fully specify the form and the control, because SQL is not
running in the scope of the form, and it will have no idea what "payto"
is.
For example:

WHERE ([RONCHECK_access].[PAYEE]=Forms![YourFormName]!payto);

However, you are trying to specify the rowsource of a combo by filtering
it
against the current value of that same combo. This means you will have a
"catch-22" situation where there's nothing in the list, because there's
nothing in the combo!!

I suggest you simply set the RowSource to:
SELECT * FROM RONCHECK_access ORDER BY PAYEE;

Leave the GotFocus event procedure as you have it.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


The combo box is still not displaying the records. Here's the code

Private Sub payto_DblClick(Cancel As Integer)
payto.Requery
End Sub

Private Sub payto_GotFocus()
payto.Dropdown
End Sub

In the row source I have
SELECT * FROM RONCHECK_access WHERE ([RONCHECK_access].[PAYEE]=payto);

I'm getting

"The text you entered isn't an item in the list". I beleive I am using
some
properties icoreectly and/or my select statement is bad. payto is the
current
combo box. Control source is PAYEE and rowsourcetype is table/query.
Autoexpand is yes.

Graham - Thanks for getting back to me.
Regards,
Len

:

Can you not achieve what you want by dropping down the combo box when
it
gets the focus? To do this, add a GetFocus event procedure with the
line:
ComboBoxName.Dropdown.

You should not have an unresolved parameter ([enter payee])in your
RowSource
query, otherwise it will always need to prompt you for the value.

If you want to list *only* the items in the list that match what you
have
typed, then you're probably better off with a textbox and a listbox.
Use
the Change event of the textbox to filter the listbox.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Autoexpand is turned on.

As I enter criteria continuously by character, I would like to see
all
the
matching records continuously. For example, if I enter a "d", I want
to
see
all the "d*" records. If the next key is an "a", then I want to see
all
the
"da*" records. Here is the sql for row source:

SELECT RONCHECK_access.*, [RONCHECK_access].[PAYEE] FROM
RONCHECK_access
WHERE ((([RONCHECK_access].[PAYEE]) Like [enter payee]));

Because I'm using "Like [enter" another data entry window opens up.
Is
there
a simpler way of doing this without "Like [enter" that will also
display
all
the matching records continuously, as I enter criteria characters.

Thanks.
:

This is turned on and off via the AutoExpand property of the combo
box.
It
should be turned on by default.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
How do I display the matching records in a combo box, everytime I
hit a
key
to continuosly enter enter the criteria?
 
Hi Len

Some questions:

1. When you paste the SQL into a query and try to run the query, do you get
a prompt for a parameter named "Form![checks_dates_payee]!payto"?

2. Is the form containing the payto combobox named "checks_dates_payee"? If
not, change the SQL to reference the correct form name.

3. If you open the form and run the query again, does it work?

4. If it still doesn't work, is the payto combobox on a subform? If so,
we'll take it from there.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
There is data from 1992. I can't use the result of a paste because the
payto
value doesn't fill into the rowsource query. I think the rowsource query
isn't working because I don't have the right form name in
Form![checks_dates_payee]!payto .Thanks.

Graham Mandeno said:
Hi Len

If you copy that rowsource and paste it into the SQL view of a new query,
does the query return any records? Are there records in your table with
dates as far back as 1992?

--

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
Hi Graham,
You put me more on the right track but I'm still not getting any data
in
the
combo box.

The rowsource now is

SELECT * FROM RONCHECK_access WHERE (RONCHECK_access.DATE Between
#07/13/1992#
And #08/27/1992# And RONCHECK_access.PAYEE =
Form![checks_dates_payee]!payto);

payto is another combo box where payee comes from. I may be having
trouble
with the form name. If I click on form & properties, there is no name
for
the
form. Do I use the name from the Forms category?

Thanks again.
Regards,
Len


:

Hi Len

WHERE ([RONCHECK_access].[PAYEE]=payto);

You cannot refer to a control on a form this way in a SQL statement.
If
you
really want to filter the rowsource based on the value in a form
control,
you need to fully specify the form and the control, because SQL is not
running in the scope of the form, and it will have no idea what
"payto"
is.
For example:

WHERE ([RONCHECK_access].[PAYEE]=Forms![YourFormName]!payto);

However, you are trying to specify the rowsource of a combo by
filtering
it
against the current value of that same combo. This means you will
have a
"catch-22" situation where there's nothing in the list, because
there's
nothing in the combo!!

I suggest you simply set the RowSource to:
SELECT * FROM RONCHECK_access ORDER BY PAYEE;

Leave the GotFocus event procedure as you have it.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


The combo box is still not displaying the records. Here's the code

Private Sub payto_DblClick(Cancel As Integer)
payto.Requery
End Sub

Private Sub payto_GotFocus()
payto.Dropdown
End Sub

In the row source I have
SELECT * FROM RONCHECK_access WHERE
([RONCHECK_access].[PAYEE]=payto);

I'm getting

"The text you entered isn't an item in the list". I beleive I am
using
some
properties icoreectly and/or my select statement is bad. payto is
the
current
combo box. Control source is PAYEE and rowsourcetype is table/query.
Autoexpand is yes.

Graham - Thanks for getting back to me.
Regards,
Len

:

Can you not achieve what you want by dropping down the combo box
when
it
gets the focus? To do this, add a GetFocus event procedure with
the
line:
ComboBoxName.Dropdown.

You should not have an unresolved parameter ([enter payee])in your
RowSource
query, otherwise it will always need to prompt you for the value.

If you want to list *only* the items in the list that match what
you
have
typed, then you're probably better off with a textbox and a
listbox.
Use
the Change event of the textbox to filter the listbox.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
Autoexpand is turned on.

As I enter criteria continuously by character, I would like to
see
all
the
matching records continuously. For example, if I enter a "d", I
want
to
see
all the "d*" records. If the next key is an "a", then I want to
see
all
the
"da*" records. Here is the sql for row source:

SELECT RONCHECK_access.*, [RONCHECK_access].[PAYEE] FROM
RONCHECK_access
WHERE ((([RONCHECK_access].[PAYEE]) Like [enter payee]));

Because I'm using "Like [enter" another data entry window opens
up.
Is
there
a simpler way of doing this without "Like [enter" that will also
display
all
the matching records continuously, as I enter criteria
characters.

Thanks.
:

This is turned on and off via the AutoExpand property of the
combo
box.
It
should be turned on by default.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
How do I display the matching records in a combo box,
everytime I
hit a
key
to continuosly enter enter the criteria?
 
Hi Graham,
I was able to copy the sql statement to a query and I was prompted to enter
the payto data. When I manually entered the data, the query displayed
correctly. I guess this means I'm referring to the payto combo box
incorrectly in the sql statement. There is only 1 form and all the controls
are on it. Is there another easier way to refer to the output of a combo box
other than "Form!chks_betw_dates_payee_object!payto" ? The exact form name
is "chks_betw_dates_payee_object" which is listed in the solid blue bar. Is
there another place to find the form name? If I look in form properties, I
don't see any form name property listed.
Thanks.

Graham Mandeno said:
Hi Len

Some questions:

1. When you paste the SQL into a query and try to run the query, do you get
a prompt for a parameter named "Form![checks_dates_payee]!payto"?

2. Is the form containing the payto combobox named "checks_dates_payee"? If
not, change the SQL to reference the correct form name.

3. If you open the form and run the query again, does it work?

4. If it still doesn't work, is the payto combobox on a subform? If so,
we'll take it from there.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
There is data from 1992. I can't use the result of a paste because the
payto
value doesn't fill into the rowsource query. I think the rowsource query
isn't working because I don't have the right form name in
Form![checks_dates_payee]!payto .Thanks.

Graham Mandeno said:
Hi Len

If you copy that rowsource and paste it into the SQL view of a new query,
does the query return any records? Are there records in your table with
dates as far back as 1992?

--

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi Graham,
You put me more on the right track but I'm still not getting any data
in
the
combo box.

The rowsource now is

SELECT * FROM RONCHECK_access WHERE (RONCHECK_access.DATE Between
#07/13/1992#
And #08/27/1992# And RONCHECK_access.PAYEE =
Form![checks_dates_payee]!payto);

payto is another combo box where payee comes from. I may be having
trouble
with the form name. If I click on form & properties, there is no name
for
the
form. Do I use the name from the Forms category?

Thanks again.
Regards,
Len


:

Hi Len

WHERE ([RONCHECK_access].[PAYEE]=payto);

You cannot refer to a control on a form this way in a SQL statement.
If
you
really want to filter the rowsource based on the value in a form
control,
you need to fully specify the form and the control, because SQL is not
running in the scope of the form, and it will have no idea what
"payto"
is.
For example:

WHERE ([RONCHECK_access].[PAYEE]=Forms![YourFormName]!payto);

However, you are trying to specify the rowsource of a combo by
filtering
it
against the current value of that same combo. This means you will
have a
"catch-22" situation where there's nothing in the list, because
there's
nothing in the combo!!

I suggest you simply set the RowSource to:
SELECT * FROM RONCHECK_access ORDER BY PAYEE;

Leave the GotFocus event procedure as you have it.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


The combo box is still not displaying the records. Here's the code

Private Sub payto_DblClick(Cancel As Integer)
payto.Requery
End Sub

Private Sub payto_GotFocus()
payto.Dropdown
End Sub

In the row source I have
SELECT * FROM RONCHECK_access WHERE
([RONCHECK_access].[PAYEE]=payto);

I'm getting

"The text you entered isn't an item in the list". I beleive I am
using
some
properties icoreectly and/or my select statement is bad. payto is
the
current
combo box. Control source is PAYEE and rowsourcetype is table/query.
Autoexpand is yes.

Graham - Thanks for getting back to me.
Regards,
Len

:

Can you not achieve what you want by dropping down the combo box
when
it
gets the focus? To do this, add a GetFocus event procedure with
the
line:
ComboBoxName.Dropdown.

You should not have an unresolved parameter ([enter payee])in your
RowSource
query, otherwise it will always need to prompt you for the value.

If you want to list *only* the items in the list that match what
you
have
typed, then you're probably better off with a textbox and a
listbox.
Use
the Change event of the textbox to filter the listbox.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
Autoexpand is turned on.

As I enter criteria continuously by character, I would like to
see
all
the
matching records continuously. For example, if I enter a "d", I
want
to
see
all the "d*" records. If the next key is an "a", then I want to
see
all
the
"da*" records. Here is the sql for row source:

SELECT RONCHECK_access.*, [RONCHECK_access].[PAYEE] FROM
RONCHECK_access
WHERE ((([RONCHECK_access].[PAYEE]) Like [enter payee]));

Because I'm using "Like [enter" another data entry window opens
up.
Is
there
a simpler way of doing this without "Like [enter" that will also
display
all
the matching records continuously, as I enter criteria
characters.

Thanks.
:

This is turned on and off via the AutoExpand property of the
combo
box.
It
should be turned on by default.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
How do I display the matching records in a combo box,
everytime I
hit a
key
to continuosly enter enter the criteria?
 
Hi Len

Sometimes in searching for minutiae, the obvious goes unnoticed. The
collection of all open forms in an Access application is called "Forms", not
"Form".

So, what you want is "Forms!chks_betw_dates_payee_object!payto" (with an
"s").
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
Hi Graham,
I was able to copy the sql statement to a query and I was prompted to
enter
the payto data. When I manually entered the data, the query displayed
correctly. I guess this means I'm referring to the payto combo box
incorrectly in the sql statement. There is only 1 form and all the
controls
are on it. Is there another easier way to refer to the output of a combo
box
other than "Form!chks_betw_dates_payee_object!payto" ? The exact form
name
is "chks_betw_dates_payee_object" which is listed in the solid blue bar.
Is
there another place to find the form name? If I look in form properties, I
don't see any form name property listed.
Thanks.

Graham Mandeno said:
Hi Len

Some questions:

1. When you paste the SQL into a query and try to run the query, do you
get
a prompt for a parameter named "Form![checks_dates_payee]!payto"?

2. Is the form containing the payto combobox named "checks_dates_payee"?
If
not, change the SQL to reference the correct form name.

3. If you open the form and run the query again, does it work?

4. If it still doesn't work, is the payto combobox on a subform? If so,
we'll take it from there.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
There is data from 1992. I can't use the result of a paste because the
payto
value doesn't fill into the rowsource query. I think the rowsource
query
isn't working because I don't have the right form name in
Form![checks_dates_payee]!payto .Thanks.

:

Hi Len

If you copy that rowsource and paste it into the SQL view of a new
query,
does the query return any records? Are there records in your table
with
dates as far back as 1992?

--

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi Graham,
You put me more on the right track but I'm still not getting any
data
in
the
combo box.

The rowsource now is

SELECT * FROM RONCHECK_access WHERE (RONCHECK_access.DATE Between
#07/13/1992#
And #08/27/1992# And RONCHECK_access.PAYEE =
Form![checks_dates_payee]!payto);

payto is another combo box where payee comes from. I may be having
trouble
with the form name. If I click on form & properties, there is no
name
for
the
form. Do I use the name from the Forms category?

Thanks again.
Regards,
Len


:

Hi Len

WHERE ([RONCHECK_access].[PAYEE]=payto);

You cannot refer to a control on a form this way in a SQL
statement.
If
you
really want to filter the rowsource based on the value in a form
control,
you need to fully specify the form and the control, because SQL is
not
running in the scope of the form, and it will have no idea what
"payto"
is.
For example:

WHERE ([RONCHECK_access].[PAYEE]=Forms![YourFormName]!payto);

However, you are trying to specify the rowsource of a combo by
filtering
it
against the current value of that same combo. This means you will
have a
"catch-22" situation where there's nothing in the list, because
there's
nothing in the combo!!

I suggest you simply set the RowSource to:
SELECT * FROM RONCHECK_access ORDER BY PAYEE;

Leave the GotFocus event procedure as you have it.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


message
The combo box is still not displaying the records. Here's the
code

Private Sub payto_DblClick(Cancel As Integer)
payto.Requery
End Sub

Private Sub payto_GotFocus()
payto.Dropdown
End Sub

In the row source I have
SELECT * FROM RONCHECK_access WHERE
([RONCHECK_access].[PAYEE]=payto);

I'm getting

"The text you entered isn't an item in the list". I beleive I am
using
some
properties icoreectly and/or my select statement is bad. payto is
the
current
combo box. Control source is PAYEE and rowsourcetype is
table/query.
Autoexpand is yes.

Graham - Thanks for getting back to me.
Regards,
Len

:

Can you not achieve what you want by dropping down the combo box
when
it
gets the focus? To do this, add a GetFocus event procedure with
the
line:
ComboBoxName.Dropdown.

You should not have an unresolved parameter ([enter payee])in
your
RowSource
query, otherwise it will always need to prompt you for the
value.

If you want to list *only* the items in the list that match what
you
have
typed, then you're probably better off with a textbox and a
listbox.
Use
the Change event of the textbox to filter the listbox.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
Autoexpand is turned on.

As I enter criteria continuously by character, I would like to
see
all
the
matching records continuously. For example, if I enter a "d",
I
want
to
see
all the "d*" records. If the next key is an "a", then I want
to
see
all
the
"da*" records. Here is the sql for row source:

SELECT RONCHECK_access.*, [RONCHECK_access].[PAYEE] FROM
RONCHECK_access
WHERE ((([RONCHECK_access].[PAYEE]) Like [enter payee]));

Because I'm using "Like [enter" another data entry window
opens
up.
Is
there
a simpler way of doing this without "Like [enter" that will
also
display
all
the matching records continuously, as I enter criteria
characters.

Thanks.
:

This is turned on and off via the AutoExpand property of the
combo
box.
It
should be turned on by default.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
How do I display the matching records in a combo box,
everytime I
hit a
key
to continuosly enter enter the criteria?
 
Hi Graham,
I made the change and it made no difference. Why didn't I get an error(form
instead of forms)? I also noticed I still have a mousedown event with the
same sql string. I commented it out & it didn't help. Can there be a conflict
between the row souce sql and an event procedure? If so, it shouldn't be an
issue now because it's commented out.

The data from the payto combo box is still not coming across.

Thanks for your patience & help.

Graham Mandeno said:
Hi Len

Sometimes in searching for minutiae, the obvious goes unnoticed. The
collection of all open forms in an Access application is called "Forms", not
"Form".

So, what you want is "Forms!chks_betw_dates_payee_object!payto" (with an
"s").
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
Hi Graham,
I was able to copy the sql statement to a query and I was prompted to
enter
the payto data. When I manually entered the data, the query displayed
correctly. I guess this means I'm referring to the payto combo box
incorrectly in the sql statement. There is only 1 form and all the
controls
are on it. Is there another easier way to refer to the output of a combo
box
other than "Form!chks_betw_dates_payee_object!payto" ? The exact form
name
is "chks_betw_dates_payee_object" which is listed in the solid blue bar.
Is
there another place to find the form name? If I look in form properties, I
don't see any form name property listed.
Thanks.

Graham Mandeno said:
Hi Len

Some questions:

1. When you paste the SQL into a query and try to run the query, do you
get
a prompt for a parameter named "Form![checks_dates_payee]!payto"?

2. Is the form containing the payto combobox named "checks_dates_payee"?
If
not, change the SQL to reference the correct form name.

3. If you open the form and run the query again, does it work?

4. If it still doesn't work, is the payto combobox on a subform? If so,
we'll take it from there.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

There is data from 1992. I can't use the result of a paste because the
payto
value doesn't fill into the rowsource query. I think the rowsource
query
isn't working because I don't have the right form name in
Form![checks_dates_payee]!payto .Thanks.

:

Hi Len

If you copy that rowsource and paste it into the SQL view of a new
query,
does the query return any records? Are there records in your table
with
dates as far back as 1992?

--

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi Graham,
You put me more on the right track but I'm still not getting any
data
in
the
combo box.

The rowsource now is

SELECT * FROM RONCHECK_access WHERE (RONCHECK_access.DATE Between
#07/13/1992#
And #08/27/1992# And RONCHECK_access.PAYEE =
Form![checks_dates_payee]!payto);

payto is another combo box where payee comes from. I may be having
trouble
with the form name. If I click on form & properties, there is no
name
for
the
form. Do I use the name from the Forms category?

Thanks again.
Regards,
Len


:

Hi Len

WHERE ([RONCHECK_access].[PAYEE]=payto);

You cannot refer to a control on a form this way in a SQL
statement.
If
you
really want to filter the rowsource based on the value in a form
control,
you need to fully specify the form and the control, because SQL is
not
running in the scope of the form, and it will have no idea what
"payto"
is.
For example:

WHERE ([RONCHECK_access].[PAYEE]=Forms![YourFormName]!payto);

However, you are trying to specify the rowsource of a combo by
filtering
it
against the current value of that same combo. This means you will
have a
"catch-22" situation where there's nothing in the list, because
there's
nothing in the combo!!

I suggest you simply set the RowSource to:
SELECT * FROM RONCHECK_access ORDER BY PAYEE;

Leave the GotFocus event procedure as you have it.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


message
The combo box is still not displaying the records. Here's the
code

Private Sub payto_DblClick(Cancel As Integer)
payto.Requery
End Sub

Private Sub payto_GotFocus()
payto.Dropdown
End Sub

In the row source I have
SELECT * FROM RONCHECK_access WHERE
([RONCHECK_access].[PAYEE]=payto);

I'm getting

"The text you entered isn't an item in the list". I beleive I am
using
some
properties icoreectly and/or my select statement is bad. payto is
the
current
combo box. Control source is PAYEE and rowsourcetype is
table/query.
Autoexpand is yes.

Graham - Thanks for getting back to me.
Regards,
Len

:

Can you not achieve what you want by dropping down the combo box
when
it
gets the focus? To do this, add a GetFocus event procedure with
the
line:
ComboBoxName.Dropdown.

You should not have an unresolved parameter ([enter payee])in
your
RowSource
query, otherwise it will always need to prompt you for the
value.

If you want to list *only* the items in the list that match what
you
have
typed, then you're probably better off with a textbox and a
listbox.
Use
the Change event of the textbox to filter the listbox.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
Autoexpand is turned on.

As I enter criteria continuously by character, I would like to
see
all
the
matching records continuously. For example, if I enter a "d",
I
want
to
see
all the "d*" records. If the next key is an "a", then I want
to
see
all
the
"da*" records. Here is the sql for row source:

SELECT RONCHECK_access.*, [RONCHECK_access].[PAYEE] FROM
RONCHECK_access
WHERE ((([RONCHECK_access].[PAYEE]) Like [enter payee]));

Because I'm using "Like [enter" another data entry window
opens
up.
Is
there
a simpler way of doing this without "Like [enter" that will
also
display
all
the matching records continuously, as I enter criteria
characters.

Thanks.
:

This is turned on and off via the AutoExpand property of the
combo
box.
It
should be turned on by default.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
How do I display the matching records in a combo box,
everytime I
hit a
key
to continuosly enter enter the criteria?
 
Hi Len

I don't understand what you mean when you say, "I still have a mousedown
event with the same sql string". A MouseDown event property can be an event
procedure (VBA code) or a macro name, but not a SQL string.

Try this: with your form open and an item selected in the payto combobox,
display the immediate (debug) window (ctrl-G) and it it type:
?Forms!chks_betw_dates_payee_object!payto
then hit <enter>

What do you see?

If you like, provided the database is not too big, you could zip it up and
send it to me at:
mvp.g.mandeno -at- xoxy.net
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


lendapilot said:
Hi Graham,
I made the change and it made no difference. Why didn't I get an
error(form
instead of forms)? I also noticed I still have a mousedown event with the
same sql string. I commented it out & it didn't help. Can there be a
conflict
between the row souce sql and an event procedure? If so, it shouldn't be
an
issue now because it's commented out.

The data from the payto combo box is still not coming across.

Thanks for your patience & help.

Graham Mandeno said:
Hi Len

Sometimes in searching for minutiae, the obvious goes unnoticed. The
collection of all open forms in an Access application is called "Forms",
not
"Form".

So, what you want is "Forms!chks_betw_dates_payee_object!payto" (with an
"s").
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

lendapilot said:
Hi Graham,
I was able to copy the sql statement to a query and I was prompted to
enter
the payto data. When I manually entered the data, the query displayed
correctly. I guess this means I'm referring to the payto combo box
incorrectly in the sql statement. There is only 1 form and all the
controls
are on it. Is there another easier way to refer to the output of a
combo
box
other than "Form!chks_betw_dates_payee_object!payto" ? The exact
form
name
is "chks_betw_dates_payee_object" which is listed in the solid blue
bar.
Is
there another place to find the form name? If I look in form
properties, I
don't see any form name property listed.
Thanks.

:

Hi Len

Some questions:

1. When you paste the SQL into a query and try to run the query, do
you
get
a prompt for a parameter named "Form![checks_dates_payee]!payto"?

2. Is the form containing the payto combobox named
"checks_dates_payee"?
If
not, change the SQL to reference the correct form name.

3. If you open the form and run the query again, does it work?

4. If it still doesn't work, is the payto combobox on a subform? If
so,
we'll take it from there.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

There is data from 1992. I can't use the result of a paste because
the
payto
value doesn't fill into the rowsource query. I think the rowsource
query
isn't working because I don't have the right form name in
Form![checks_dates_payee]!payto .Thanks.

:

Hi Len

If you copy that rowsource and paste it into the SQL view of a new
query,
does the query return any records? Are there records in your table
with
dates as far back as 1992?

--

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
Hi Graham,
You put me more on the right track but I'm still not getting any
data
in
the
combo box.

The rowsource now is

SELECT * FROM RONCHECK_access WHERE (RONCHECK_access.DATE Between
#07/13/1992#
And #08/27/1992# And RONCHECK_access.PAYEE =
Form![checks_dates_payee]!payto);

payto is another combo box where payee comes from. I may be
having
trouble
with the form name. If I click on form & properties, there is no
name
for
the
form. Do I use the name from the Forms category?

Thanks again.
Regards,
Len


:

Hi Len

WHERE ([RONCHECK_access].[PAYEE]=payto);

You cannot refer to a control on a form this way in a SQL
statement.
If
you
really want to filter the rowsource based on the value in a form
control,
you need to fully specify the form and the control, because SQL
is
not
running in the scope of the form, and it will have no idea what
"payto"
is.
For example:

WHERE ([RONCHECK_access].[PAYEE]=Forms![YourFormName]!payto);

However, you are trying to specify the rowsource of a combo by
filtering
it
against the current value of that same combo. This means you
will
have a
"catch-22" situation where there's nothing in the list, because
there's
nothing in the combo!!

I suggest you simply set the RowSource to:
SELECT * FROM RONCHECK_access ORDER BY PAYEE;

Leave the GotFocus event procedure as you have it.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


message
The combo box is still not displaying the records. Here's the
code

Private Sub payto_DblClick(Cancel As Integer)
payto.Requery
End Sub

Private Sub payto_GotFocus()
payto.Dropdown
End Sub

In the row source I have
SELECT * FROM RONCHECK_access WHERE
([RONCHECK_access].[PAYEE]=payto);

I'm getting

"The text you entered isn't an item in the list". I beleive I
am
using
some
properties icoreectly and/or my select statement is bad. payto
is
the
current
combo box. Control source is PAYEE and rowsourcetype is
table/query.
Autoexpand is yes.

Graham - Thanks for getting back to me.
Regards,
Len

:

Can you not achieve what you want by dropping down the combo
box
when
it
gets the focus? To do this, add a GetFocus event procedure
with
the
line:
ComboBoxName.Dropdown.

You should not have an unresolved parameter ([enter payee])in
your
RowSource
query, otherwise it will always need to prompt you for the
value.

If you want to list *only* the items in the list that match
what
you
have
typed, then you're probably better off with a textbox and a
listbox.
Use
the Change event of the textbox to filter the listbox.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
Autoexpand is turned on.

As I enter criteria continuously by character, I would like
to
see
all
the
matching records continuously. For example, if I enter a
"d",
I
want
to
see
all the "d*" records. If the next key is an "a", then I
want
to
see
all
the
"da*" records. Here is the sql for row source:

SELECT RONCHECK_access.*, [RONCHECK_access].[PAYEE] FROM
RONCHECK_access
WHERE ((([RONCHECK_access].[PAYEE]) Like [enter payee]));

Because I'm using "Like [enter" another data entry window
opens
up.
Is
there
a simpler way of doing this without "Like [enter" that will
also
display
all
the matching records continuously, as I enter criteria
characters.

Thanks.
:

This is turned on and off via the AutoExpand property of
the
combo
box.
It
should be turned on by default.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

in
message
How do I display the matching records in a combo box,
everytime I
hit a
key
to continuosly enter enter the criteria?
 
Hi Graham,
The problem is solved. When I tried

?Forms!chks_betw_dates_payee_object!payto

I got back the date instead of the payee. Then I realized the payto combo
box was bound to the date field instead of the payee field. When I fixed
this, everything worked. By the way, the mousedown event is in vba code.

As usual, thanks for the great help and it again proved to be something
simple.

Regards,
Len

Graham Mandeno said:
Hi Len

I don't understand what you mean when you say, "I still have a mousedown
event with the same sql string". A MouseDown event property can be an event
procedure (VBA code) or a macro name, but not a SQL string.

Try this: with your form open and an item selected in the payto combobox,
display the immediate (debug) window (ctrl-G) and it it type:
?Forms!chks_betw_dates_payee_object!payto
then hit <enter>

What do you see?

If you like, provided the database is not too big, you could zip it up and
send it to me at:
mvp.g.mandeno -at- xoxy.net
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


lendapilot said:
Hi Graham,
I made the change and it made no difference. Why didn't I get an
error(form
instead of forms)? I also noticed I still have a mousedown event with the
same sql string. I commented it out & it didn't help. Can there be a
conflict
between the row souce sql and an event procedure? If so, it shouldn't be
an
issue now because it's commented out.

The data from the payto combo box is still not coming across.

Thanks for your patience & help.

Graham Mandeno said:
Hi Len

Sometimes in searching for minutiae, the obvious goes unnoticed. The
collection of all open forms in an Access application is called "Forms",
not
"Form".

So, what you want is "Forms!chks_betw_dates_payee_object!payto" (with an
"s").
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi Graham,
I was able to copy the sql statement to a query and I was prompted to
enter
the payto data. When I manually entered the data, the query displayed
correctly. I guess this means I'm referring to the payto combo box
incorrectly in the sql statement. There is only 1 form and all the
controls
are on it. Is there another easier way to refer to the output of a
combo
box
other than "Form!chks_betw_dates_payee_object!payto" ? The exact
form
name
is "chks_betw_dates_payee_object" which is listed in the solid blue
bar.
Is
there another place to find the form name? If I look in form
properties, I
don't see any form name property listed.
Thanks.

:

Hi Len

Some questions:

1. When you paste the SQL into a query and try to run the query, do
you
get
a prompt for a parameter named "Form![checks_dates_payee]!payto"?

2. Is the form containing the payto combobox named
"checks_dates_payee"?
If
not, change the SQL to reference the correct form name.

3. If you open the form and run the query again, does it work?

4. If it still doesn't work, is the payto combobox on a subform? If
so,
we'll take it from there.

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

There is data from 1992. I can't use the result of a paste because
the
payto
value doesn't fill into the rowsource query. I think the rowsource
query
isn't working because I don't have the right form name in
Form![checks_dates_payee]!payto .Thanks.

:

Hi Len

If you copy that rowsource and paste it into the SQL view of a new
query,
does the query return any records? Are there records in your table
with
dates as far back as 1992?

--

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
Hi Graham,
You put me more on the right track but I'm still not getting any
data
in
the
combo box.

The rowsource now is

SELECT * FROM RONCHECK_access WHERE (RONCHECK_access.DATE Between
#07/13/1992#
And #08/27/1992# And RONCHECK_access.PAYEE =
Form![checks_dates_payee]!payto);

payto is another combo box where payee comes from. I may be
having
trouble
with the form name. If I click on form & properties, there is no
name
for
the
form. Do I use the name from the Forms category?

Thanks again.
Regards,
Len


:

Hi Len

WHERE ([RONCHECK_access].[PAYEE]=payto);

You cannot refer to a control on a form this way in a SQL
statement.
If
you
really want to filter the rowsource based on the value in a form
control,
you need to fully specify the form and the control, because SQL
is
not
running in the scope of the form, and it will have no idea what
"payto"
is.
For example:

WHERE ([RONCHECK_access].[PAYEE]=Forms![YourFormName]!payto);

However, you are trying to specify the rowsource of a combo by
filtering
it
against the current value of that same combo. This means you
will
have a
"catch-22" situation where there's nothing in the list, because
there's
nothing in the combo!!

I suggest you simply set the RowSource to:
SELECT * FROM RONCHECK_access ORDER BY PAYEE;

Leave the GotFocus event procedure as you have it.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


message
The combo box is still not displaying the records. Here's the
code

Private Sub payto_DblClick(Cancel As Integer)
payto.Requery
End Sub

Private Sub payto_GotFocus()
payto.Dropdown
End Sub

In the row source I have
SELECT * FROM RONCHECK_access WHERE
([RONCHECK_access].[PAYEE]=payto);

I'm getting

"The text you entered isn't an item in the list". I beleive I
am
using
some
properties icoreectly and/or my select statement is bad. payto
is
the
current
combo box. Control source is PAYEE and rowsourcetype is
table/query.
Autoexpand is yes.

Graham - Thanks for getting back to me.
Regards,
Len

:

Can you not achieve what you want by dropping down the combo
box
when
it
gets the focus? To do this, add a GetFocus event procedure
with
the
line:
ComboBoxName.Dropdown.

You should not have an unresolved parameter ([enter payee])in
your
RowSource
query, otherwise it will always need to prompt you for the
value.

If you want to list *only* the items in the list that match
what
you
have
typed, then you're probably better off with a textbox and a
listbox.
Use
the Change event of the textbox to filter the listbox.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
Autoexpand is turned on.

As I enter criteria continuously by character, I would like
to
see
all
the
matching records continuously. For example, if I enter a
"d",
I
want
to
see
all the "d*" records. If the next key is an "a", then I
want
to
see
all
the
"da*" records. Here is the sql for row source:

SELECT RONCHECK_access.*, [RONCHECK_access].[PAYEE] FROM
RONCHECK_access
WHERE ((([RONCHECK_access].[PAYEE]) Like [enter payee]));

Because I'm using "Like [enter" another data entry window
opens
up.
Is
there
a simpler way of doing this without "Like [enter" that will
also
display
all
the matching records continuously, as I enter criteria
characters.

Thanks.
:

This is turned on and off via the AutoExpand property of
the
combo
box.
It
should be turned on by default.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

in
message
How do I display the matching records in a combo box,
everytime I
hit a
key
to continuosly enter enter the criteria?
 
Back
Top