Searching query in form

T

tom

We have queries embedded in forms in several places
in our accounting program.

If you enter a letter or a number, you go to the start of
the group that begins with that letter. Then when you hit
a different letter or number, you go to the start of that group that begins
with that letter.

I would like to be able to enter a letter or number and then when the second
letter or number is entered it
goes to the group that begins with first key entered
and whose second digit matches the second key entered.
 
J

Jeff Boyce

"How" depends on "what" ...

I don't have a very clear picture of what you are doing. And I'm not sure
what approach you've used to "embed queries in forms".

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
T

tom

The query is created by the following
code when the form is opened:

Me![By Search Type].RowSource = "SELECT Payables.[Expense Type],
Payables.[Invoice Date], Suppliers.[Supplier Name], Payables.[Bill ID] FROM
(Payables LEFT JOIN Suppliers ON Payables.[Supplier Number] =
Suppliers.[Supplier Number]) ORDER BY Payables.[Expense Type];"

When you click on the query and then enter a key
it will search for the first record with that key, when
you press another key it goes to first record with that key
and so on. I would like to enter a key, go to first record,
enter a second key, have this second key match second
digit and first key match first digit.
 
U

UpRider

Tom, if [By Search Type] is a combo box, set its "auto expand" property to
YES and it should behave as you wish.

HTH, UpRider

tom said:
The query is created by the following
code when the form is opened:

Me![By Search Type].RowSource = "SELECT Payables.[Expense Type],
Payables.[Invoice Date], Suppliers.[Supplier Name], Payables.[Bill ID]
FROM (Payables LEFT JOIN Suppliers ON Payables.[Supplier Number] =
Suppliers.[Supplier Number]) ORDER BY Payables.[Expense Type];"

When you click on the query and then enter a key
it will search for the first record with that key, when
you press another key it goes to first record with that key
and so on. I would like to enter a key, go to first record,
enter a second key, have this second key match second
digit and first key match first digit.


Jeff Boyce said:
"How" depends on "what" ...

I don't have a very clear picture of what you are doing. And I'm not
sure what approach you've used to "embed queries in forms".

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
T

tom

It is a list box.


UpRider said:
Tom, if [By Search Type] is a combo box, set its "auto expand" property to
YES and it should behave as you wish.

HTH, UpRider

tom said:
The query is created by the following
code when the form is opened:

Me![By Search Type].RowSource = "SELECT Payables.[Expense Type],
Payables.[Invoice Date], Suppliers.[Supplier Name], Payables.[Bill ID]
FROM (Payables LEFT JOIN Suppliers ON Payables.[Supplier Number] =
Suppliers.[Supplier Number]) ORDER BY Payables.[Expense Type];"

When you click on the query and then enter a key
it will search for the first record with that key, when
you press another key it goes to first record with that key
and so on. I would like to enter a key, go to first record,
enter a second key, have this second key match second
digit and first key match first digit.


Jeff Boyce said:
"How" depends on "what" ...

I don't have a very clear picture of what you are doing. And I'm not
sure what approach you've used to "embed queries in forms".

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP

We have queries embedded in forms in several places
in our accounting program.

If you enter a letter or a number, you go to the start of
the group that begins with that letter. Then when you hit
a different letter or number, you go to the start of that group that
begins with that letter.

I would like to be able to enter a letter or number and then when the
second letter or number is entered it
goes to the group that begins with first key entered
and whose second digit matches the second key entered.
 

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