Action without click

A

alex

Hello everyone,

Using Access ’03…

I have a Form in which users search for data in an underlying Table by
means of a textbox. Users can type or “scan” a jacket number into the
textbox and click a command button that does the search.

The aforementioned works fine, but I’d like the search to begin after
the jacket number is entered without having to click the command
button. In my environment, users can quickly scan a number into the
database with a hand scanner; having to then grab the mouse or
keyboard can be cumbersome.

The jacket numbers are either 6 or 8 characters long. I wasn’t sure
if there was a way to code the form to execute its query (it performs
a make table) after the character string (might be hard since there
can be two lengths) or some other way to recognize/predict when to
start the query. The Form will not see 6 character jacket numbers too
often, so we could code just the 8 character jacket.

Thoughts?
alex
 
D

Dominic Vella

You could use the 'After Update' event. The user will have to press
<Enter> for the event to start.

Dom

Hello everyone,

Using Access ’03…

I have a Form in which users search for data in an underlying Table by
means of a textbox. Users can type or “scan” a jacket number into the
textbox and click a command button that does the search.

The aforementioned works fine, but I’d like the search to begin after
the jacket number is entered without having to click the command
button. In my environment, users can quickly scan a number into the
database with a hand scanner; having to then grab the mouse or
keyboard can be cumbersome.

The jacket numbers are either 6 or 8 characters long. I wasn’t sure
if there was a way to code the form to execute its query (it performs
a make table) after the character string (might be hard since there
can be two lengths) or some other way to recognize/predict when to
start the query. The Form will not see 6 character jacket numbers too
often, so we could code just the 8 character jacket.

Thoughts?
alex
 
A

alex

You could use the 'After Update' event.   The user will have to press
<Enter> for the event to start.

Dom


Hello everyone,

Using Access ’03…

I have a Form in which users search for data in an underlying Table by
means of a textbox.  Users can type or “scan” a jacket number into the
textbox and click a command button that does the search.

The aforementioned works fine, but I’d like the search to begin after
the jacket number is entered without having to click the command
button.  In my environment, users can quickly scan a number into the
database with a hand scanner; having to then grab the mouse or
keyboard can be cumbersome.

The jacket numbers are either 6 or 8 characters long.  I wasn’t sure
if there was a way to code the form to execute its query (it performs
a make table) after the character string (might be hard since there
can be two lengths) or some other way to recognize/predict when to
start the query.  The Form will not see 6 character jacket numbers too
often, so we could code just the 8 character jacket.

Thoughts?
alex

Thanks Dom...that's a lot better than having to click the cmdbutton.
In additon, do you know if you can code the text box to execute a
query after receiving 8 characters?
 
D

Dominic Vella

G'day Alex

Ahh, off the top of my head, i'd try something like this:

Sub txtJacket_change
If Len(trim(txtJacket)>=8) Then
' Put your ExecuteQuery routine here
End If
End Sub

I haven't tested the idea yet, hope it leads you in the right direction

Dom

You could use the 'After Update' event. The user will have to press
<Enter> for the event to start.

Dom


Hello everyone,

Using Access ’03…

I have a Form in which users search for data in an underlying Table by
means of a textbox. Users can type or “scan” a jacket number into the
textbox and click a command button that does the search.

The aforementioned works fine, but I’d like the search to begin after
the jacket number is entered without having to click the command
button. In my environment, users can quickly scan a number into the
database with a hand scanner; having to then grab the mouse or
keyboard can be cumbersome.

The jacket numbers are either 6 or 8 characters long. I wasn’t sure
if there was a way to code the form to execute its query (it performs
a make table) after the character string (might be hard since there
can be two lengths) or some other way to recognize/predict when to
start the query. The Form will not see 6 character jacket numbers too
often, so we could code just the 8 character jacket.

Thoughts?
alex

Thanks Dom...that's a lot better than having to click the cmdbutton.
In additon, do you know if you can code the text box to execute a
query after receiving 8 characters?
 

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