Barcode Problem

J

Jack

Hi Everyone,

I am in the process of developing a stocktake program. I can get the barcode
scanner to work well with Access, but what I need to do is have the program
communicate with the scanner so that when a invalid barcode no is scanned, a
sound is emitted. A different sound will also need to be emitted for a valid
barcode no. Is there some way of configuring the barcode scanner to make two
different sounds? I have an item master table in access which records all
valid and invalid barcode numbers.

Cheers
 
T

Tony Toews

Jack said:
I am in the process of developing a stocktake program. I can get the barcode
scanner to work well with Access, but what I need to do is have the program
communicate with the scanner so that when a invalid barcode no is scanned, a
sound is emitted. A different sound will also need to be emitted for a valid
barcode no. Is there some way of configuring the barcode scanner to make two
different sounds? I have an item master table in access which records all
valid and invalid barcode numbers.

That depends on the bar code scanner. You will need to ask the bar
code vendor how you can do this. They may not know how to do this in
Access so if nothing else ask for the Visual Basic solution which
should work.

Also you might want to have different noises on the PC.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
J

Jack

Cheers Tony,

Do you know how I could implement a sound file which would play upon the
scanning of an invalid part?

The vb code which produces a warning (pop-up) in my application is:

If StrValid = 0 Then
MsgBox "This part does not exist in Item Master: " & _
[Forms] ! [Actual Stocktake]![TxtProd] & Chr (13) & _
"Enter a valid part number", vbInformation,"Invalid Part"
[Forms]![Actual Stocktake].undo
[Forms]![Actual Stocktake]![TxtCarStatus] = " "
[Forms]![Actual Stocktake]![TxtMasterstatus] = " "

What I need is a bit of code which would also produce a warning sound. If
you can help, I would really appreciate it.

Thanks
 
D

Douglas J. Steele

http://www.mvps.org/access/api/api0011.htm at "The Access Web" shows how to
play a WAV or MIDI file.

I show how to play an MP3 file in my November, 2004 "Access Answers" column
in Pinnacle Publication's "Smart Access". You can download the column (and
sample database) for free from
http://www.accessmvp.com/djsteele/SmartAccess.html

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Jack said:
Cheers Tony,

Do you know how I could implement a sound file which would play upon the
scanning of an invalid part?

The vb code which produces a warning (pop-up) in my application is:

If StrValid = 0 Then
MsgBox "This part does not exist in Item Master: " & _
[Forms] ! [Actual Stocktake]![TxtProd] & Chr (13) & _
"Enter a valid part number", vbInformation,"Invalid
Part"
[Forms]![Actual Stocktake].undo
[Forms]![Actual Stocktake]![TxtCarStatus] = " "
[Forms]![Actual Stocktake]![TxtMasterstatus] = " "

What I need is a bit of code which would also produce a warning sound. If
you can help, I would really appreciate it.

Thanks

Tony Toews said:
That depends on the bar code scanner. You will need to ask the bar
code vendor how you can do this. They may not know how to do this in
Access so if nothing else ask for the Visual Basic solution which
should work.

Also you might want to have different noises on the PC.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

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