I have an Access application that I have created that collects data
from a scanner and from a weighting scale. The data from the scanner
are unique identifiers (barcodes) and the scanner is connected as a
keyboard wedge. The data from the scale are weights and are
collected
by com port using MScomm32.ocx.
A user will scan a barcode into a text box (linked to a table field)
and then weight a sample. The weight will be collected from the com
port and directly updated to the table. To insure the user that the
weight was successfully captured, I have included a listbox which
queries the table after each scale recording. This way the user can
see their data show up on the screen in a mock spreadsheet.
My problem is that about 1 in 100 barcode scans do not completely
read. I have traced this error to the requerying of the listbox
control. If a barcode is being read in at the same time as the
listbox is being updated, there is a slight chance of the text box
(in
which the barcode is being entered) losing focus for a split second.
Since the computer sees the scanner as a keyboard wedge, it sends the
data to whatever has focus. When the text box loses focus, I lose
part of the barcode.
Is there a way to maintain focus on the text box no matter what
background processes are running? Or better yet is there a better
way
to run a query that doesn't take focus away from foreground
processes?
Thanks. 5 5195
LabGeek wrote:
A user will scan a barcode into a text box (linked to a table field)
<snip>
Is there a way to maintain focus on the text box no matter what
background processes are running? Or better yet is there a better
way
to run a query that doesn't take focus away from foreground
processes?
If you're inputting two things at once, then you run the risk of the
problem you describe. What about not requerying the list box control
except as the after update event of the text box that receives the scan?
You may have to change your interface on the form so that the user
knows s/he should weigh the sample first and then scan the bar code.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Be Careful, Big Bird!" - Ditto "TIM-MAY!!" - Me
On Feb 21, 12:03 pm, Tim Marshall
<TIM...@PurplePandaChasers.Moertheriumwrote:
LabGeek wrote:
A user will scan a barcode into a text box (linked to a table field)
<snip>
Is there a way to maintain focus on the text box no matter what
background processes are running? Or better yet is there a better
way
to run a query that doesn't take focus away from foreground
processes?
If you're inputting two things at once, then you run the risk of the
problem you describe. What about not requerying the list box control
except as the after update event of the text box that receives the scan?
You may have to change your interface on the form so that the user
knows s/he should weigh the sample first and then scan the bar code.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Be Careful, Big Bird!" - Ditto "TIM-MAY!!" - Me
Tim,
Thanks for the reply. There are two users in this process. One is
scanning the barcode and taking another measurement which is being
"picked" off a list of barcodes adn the second person is weighting.
The way it is set up, both operators can run independantly of each
other as long as 1) there has been a barcode scanned in for the
record, and 2)they keep the samples in order. This way, person one
can scan multiple samples and be ahead of person two who is doing the
weighting. The scale sends the data to the record with the oldest
timestamp that doesn't have a weight and then updates the screen
(list). This was neither person has to wait for a sample to be
totally completed before starting the next one.
When things are timed just right I have no problems, but when the
people taking the measurements get just out of synch (or are operating
fast) then I get the chance of the list box running a query at the
same time the scaner is reading a bar code. When this happens, there
is the smallest window of time when the text box loses focus and we
lose some of the scanned barcode.
I have tried adding conditions such as "don't query if the text box <>
"" " but this seems to confuse people when the hear the scale beep but
the screen hasn't updated to show the weight has sucessfully taken.
is the listbox locked ? or disabled ? wouldn't that prevent it from
getting focus ?
how is the listbox updated ? a timer event ?
On Feb 21, 2:37 pm, "LabGeek" <tlbr...@monsanto.comwrote:
On Feb 21, 12:03 pm, Tim Marshall
<TIM...@PurplePandaChasers.Moertheriumwrote:
LabGeek wrote:
A user will scan a barcode into a text box (linked to a table field)
<snip>
Is there a way to maintain focus on the text box no matter what
background processes are running? Or better yet is there a better
way
to run a query that doesn't take focus away from foreground
processes?
If you're inputting two things at once, then you run the risk of the
problem you describe. What about not requerying the list box control
except as the after update event of the text box that receives the scan?
You may have to change your interface on the form so that the user
knows s/he should weigh the sample first and then scan the bar code.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Be Careful, Big Bird!" - Ditto "TIM-MAY!!" - Me
Tim,
Thanks for the reply. There are two users in this process. One is
scanning the barcode and taking another measurement which is being
"picked" off a list of barcodes adn the second person is weighting.
The way it is set up, both operators can run independantly of each
other as long as 1) there has been a barcode scanned in for the
record, and 2)they keep the samples in order. This way, person one
can scan multiple samples and be ahead of person two who is doing the
weighting. The scale sends the data to the record with the oldest
timestamp that doesn't have a weight and then updates the screen
(list). This was neither person has to wait for a sample to be
totally completed before starting the next one.
When things are timed just right I have no problems, but when the
people taking the measurements get just out of synch (or are operating
fast) then I get the chance of the list box running a query at the
same time the scaner is reading a bar code. When this happens, there
is the smallest window of time when the text box loses focus and we
lose some of the scanned barcode.
I have tried adding conditions such as "don't query if the text box <>
"" " but this seems to confuse people when the hear the scale beep but
the screen hasn't updated to show the weight has sucessfully taken.- Hide quoted text -
- Show quoted text -
On Feb 21, 4:05 pm, lesperan...@natpro.com wrote:
is the listbox locked ? or disabled ? wouldn't that prevent it from
getting focus ?
how is the listbox updated ? a timer event ?
On Feb 21, 2:37 pm, "LabGeek" <tlbr...@monsanto.comwrote:
On Feb 21, 12:03 pm, Tim Marshall
<TIM...@PurplePandaChasers.Moertheriumwrote:
LabGeek wrote:
A user will scan a barcode into a text box (linked to a table field)
<snip>
Is there a way to maintain focus on the text box no matter what
background processes are running? Or better yet is there a better
way
to run a query that doesn't take focus away from foreground
processes?
If you're inputting two things at once, then you run the risk of the
problem you describe. What about not requerying the list box control
except as the after update event of the text box that receives the scan?
You may have to change your interface on the form so that the user
knows s/he should weigh the sample first and then scan the bar code.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Be Careful, Big Bird!" - Ditto "TIM-MAY!!" - Me
Tim,
Thanks for the reply. There are two users in this process. One is
scanning the barcode and taking another measurement which is being
"picked" off a list of barcodes adn the second person is weighting.
The way it is set up, both operators can run independantly of each
other as long as 1) there has been a barcode scanned in for the
record, and 2)they keep the samples in order. This way, person one
can scan multiple samples and be ahead of person two who is doing the
weighting. The scale sends the data to the record with the oldest
timestamp that doesn't have a weight and then updates the screen
(list). This was neither person has to wait for a sample to be
totally completed before starting the next one.
When things are timed just right I have no problems, but when the
people taking the measurements get just out of synch (or are operating
fast) then I get the chance of the list box running a query at the
same time the scaner is reading a bar code. When this happens, there
is the smallest window of time when the text box loses focus and we
lose some of the scanned barcode.
I have tried adding conditions such as "don't query if the text box <>
"" " but this seems to confuse people when the hear the scale beep but
the screen hasn't updated to show the weight has sucessfully taken.- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
There are 5 basic contols on the form. 2 bound text boxes for
scanning in a barcode and a measurement, a text box for displaying
data from a scale, a graph for creating time course representation and
a list box to display all the data that will fit (this is so the users
can monitor the previous several records. The list box and graph are
fed from querys that are run each time there is a Form_update event.
The text boxes are not locked to allow data to be scanned directly
into them. The weight values that are shown on the screen are read
from the table after the com event records them from the scale.
Each time the scale records data, I must requery the table to place
the weight on the screen to "prove" to the user that the value has
been recorded. Sometimes during that query, a second user will scan a
barcode into the unlocked, bound text box (which creates a new record)
and there is a short interval that the text box loses focus and drops
characters.
Thank for the reply!
Are you sure that the textbox has lost focus... or is Access still
processing the form's
after_update() event ?
what happens if you move the requerying of the list box from the
after_update() event to the timer() event ?
are the listbox and graph controls enabled ? is so, why can't they be
disabled so that they can't get focus ?
On Feb 21, 3:49 pm, "LabGeek" <tlbr...@monsanto.comwrote:
On Feb 21, 4:05 pm, lesperan...@natpro.com wrote:
is the listbox locked ? or disabled ? wouldn't that prevent it from
getting focus ?
how is the listbox updated ? a timer event ?
On Feb 21, 2:37 pm, "LabGeek" <tlbr...@monsanto.comwrote:
On Feb 21, 12:03 pm, Tim Marshall
<TIM...@PurplePandaChasers.Moertheriumwrote:
LabGeek wrote:
A user will scan a barcode into a text box (linked to a table field)
<snip>
Is there a way to maintain focus on the text box no matter what
background processes are running? Or better yet is there a better
way
to run a query that doesn't take focus away from foreground
processes?
If you're inputting two things at once, then you run the risk of the
problem you describe. What about not requerying the list box control
except as the after update event of the text box that receives the scan?
You may have to change your interface on the form so that the user
knows s/he should weigh the sample first and then scan the bar code.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Be Careful, Big Bird!" - Ditto "TIM-MAY!!" - Me
Tim,
Thanks for the reply. There are two users in this process. One is
scanning the barcode and taking another measurement which is being
"picked" off a list of barcodes adn the second person is weighting.
The way it is set up, both operators can run independantly of each
other as long as 1) there has been a barcode scanned in for the
record, and 2)they keep the samples in order. This way, person one
can scan multiple samples and be ahead of person two who is doing the
weighting. The scale sends the data to the record with the oldest
timestamp that doesn't have a weight and then updates the screen
(list). This was neither person has to wait for a sample to be
totally completed before starting the next one.
When things are timed just right I have no problems, but when the
people taking the measurements get just out of synch (or are operating
fast) then I get the chance of the list box running a query at the
same time the scaner is reading a bar code. When this happens, there
is the smallest window of time when the text box loses focus and we
lose some of the scanned barcode.
I have tried adding conditions such as "don't query if the text box <>
"" " but this seems to confuse people when the hear the scale beep but
the screen hasn't updated to show the weight has sucessfully taken.- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -
There are 5 basic contols on the form. 2 bound text boxes for
scanning in a barcode and a measurement, a text box for displaying
data from a scale, a graph for creating time course representation and
a list box to display all the data that will fit (this is so the users
can monitor the previous several records. The list box and graph are
fed from querys that are run each time there is a Form_update event.
The text boxes are not locked to allow data to be scanned directly
into them. The weight values that are shown on the screen are read
from the table after the com event records them from the scale.
Each time the scale records data, I must requery the table to place
the weight on the screen to "prove" to the user that the value has
been recorded. Sometimes during that query, a second user will scan a
barcode into the unlocked, bound text box (which creates a new record)
and there is a short interval that the text box loses focus and drops
characters.
Thank for the reply!- Hide quoted text -
- Show quoted text -
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Morten Wennevik |
last post by:
I'm pretty sure this has been mentioned a few times, but so far I haven't
found anything.
I am trying to "lock" a program to always focus, non closable etc, but
overriding OnDeactivate and...
|
by: Michael Adams |
last post by:
I don't know if you have noticed, but it seems like Microsoft is losing
interest in C#, and putting their energy into Visual Basic.NET instead.
For instance, online chats by language since July...
|
by: DomGo |
last post by:
Hi,
I try to open a form, that automatically loses focus to the window, that had
the focus immediatly before the new form has been opened. The new form is
topmost and displays a message only for...
|
by: Stefan De Schepper |
last post by:
Dear NG,
I created a gridlike usercontrol. When clicking on a cell a textbox (or
other control, depending on the cell's editortype) is shown. When some other
control gets the focus, the textbox...
|
by: Chris |
last post by:
I have a form that calls ShowDialog on a number of different forms at
different times. I want to be able to know anytime the form loses
focus. But Form.Focused isn't ever true once a control has...
|
by: Israel |
last post by:
The problem:
I want to know, definitively when a slider loses focus after a user has
started sliding and hasn't released the mouse yet. It appears that
this is captured with the WM_ACTIVATEAPP...
|
by: Patrick [MSFT] |
last post by:
Let me preface this with the goal I'm trying to achieve is mimic a feature
of another language (Dexterity used by Microsoft Dynamics) and so while a
filling a drop down list is a workable solution...
|
by: euthymos |
last post by:
Dear developers,
I'm developing an application which uses MSWord Interop interface. When
my application launches MSWord, my application itself loses the focus
(even if MSWord is not visible).
...
|
by: bugboy |
last post by:
I'm trying to find a cross browser solution for editing text in a flickr photo caption manor where the text is displayed in a <div> or <a> tag but changes to a <textarea> via JS when clicked.
...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: erikbower65 |
last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps:
1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal.
2. Connect to...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |