Question about Scanner in MSAccess Form

J

Joe Cilinceon

I have with a button that activates our scanner. The code is basically like

Dim stAppName As String

stAppName = "C:\Program Files\ScanSoft\PaperPort\PaprPort.exe"
' stAppName = "C:\Program Files\Canon\CanoScan Toolbox
Ver4.1\CSTBox.exe"
Call Shell(stAppName, 1)

What would be the best way to set this up for multiple or different
scanners? As you can see we have to different scanners on 2 machines and at
the moment I rem out the line to the wrong scanner.
 
P

PC Datasheet

Use an option group near your button where Option 1 is Scanner 1 and Option
2 is scanner 2 or vice versa depending on which one you want to be the
default. Set the default vaue of the option group as 1. Put the following
code in the Click event of your button:
If Me!NameOfIptionGroup = 1 Then
stAppName = "C:\Program Files\ScanSoft\PaperPort\PaprPort.exe"
Else
stAppName = "C:\Program Files\Canon\CanoScan Toolbox Ver4.1\CSTBox.exe"
End If

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!
 
J

Joe Cilinceon

Thanks I knew it had to be simple, just my brain isn't working yet this
morning.
 
J

Jeff Boyce

Puh-lease!

As you've been reminded repeatedly, these newsgroups exist to provide free
assistance to folks with questions about using MS Access.

So, first, thanks for offering the poster free assistance.

And second, lay off the advertising -- if everyone hustled business here,
who would want to post a question?

Regards

Jeff Boyce
<Office/Access MVP>
 
J

John Spencer

Another method would be to test for the existence of the specific scanner
exe using a call to DIR

If Len(Dir("C:\Program Files\ScanSoft\PaperPort\PaprPort.exe"))> 0 then
stAppName ="C:\Program Files\ScanSoft\PaperPort\PaprPort.exe"

elseIf Len(Dir("C:\Program Files\Canon\CanoScan Toolbox
Ver4.1\CSTBox.exe"))>0 then
stAppName="C:\Program Files\Canon\CanoScan Toolbox Ver4.1\CSTBox.exe"

Else
MsgBox "No scanner tool available"
Exit Function 'Or Exit Sub
End IF

This could be adapted to using a table of scanner exe locations and stepping
through the table. Or you could have the users identify the location of the
scanner exe when they first use the scanner and store that location in a
table. In most cases I would advise against storing the location in the
code itself. It means if you upgrade or change the scanner then the code
must be modified and redeployed.
 
J

Joe Cilinceon

Actually Jeff he/she answered my question.

Jeff said:
Puh-lease!

As you've been reminded repeatedly, these newsgroups exist to provide
free assistance to folks with questions about using MS Access.

So, first, thanks for offering the poster free assistance.

And second, lay off the advertising -- if everyone hustled business
here, who would want to post a question?

Regards

Jeff Boyce
<Office/Access MVP>
 
J

Joe Cilinceon

John said:
Another method would be to test for the existence of the specific
scanner exe using a call to DIR

If Len(Dir("C:\Program Files\ScanSoft\PaperPort\PaprPort.exe"))> 0
then stAppName ="C:\Program Files\ScanSoft\PaperPort\PaprPort.exe"

elseIf Len(Dir("C:\Program Files\Canon\CanoScan Toolbox
Ver4.1\CSTBox.exe"))>0 then
stAppName="C:\Program Files\Canon\CanoScan Toolbox
Ver4.1\CSTBox.exe"
Else
MsgBox "No scanner tool available"
Exit Function 'Or Exit Sub
End IF

This could be adapted to using a table of scanner exe locations and
stepping through the table. Or you could have the users identify the
location of the scanner exe when they first use the scanner and store
that location in a table. In most cases I would advise against
storing the location in the code itself. It means if you upgrade or
change the scanner then the code must be modified and redeployed.

Thanks John I'll give this a try also.
 
J

Jeff Boyce

Yes. I noted that in my 'first' point.

You may not have encountered the volume of PCD's advertising.

Jeff Boyce
<Office/Access MVP>
 
J

John Marshall, MVP

The problem is master steve santos AKA PCD has repeated offered assistance,
but failed to mention that his assistance came at a price. He has been told
many times that these newsgroups were created for users to obtain FREE
support from other users.

In attempt to get around this, he has placed his solicitations below his
sigline under the guise of being part of the sigline. Most newsgroups will
tolerate some form of self promotion, but steve's is far beyond that. The
first line of the solicitation is rather insulting to the regulars who spend
their own time helping others with the only expected compensation of a
simple thank you. If steve can help why does he not do like the others and
answer for free? For steve, his participation in the newsgroups is only as a
means of making money off of unsuspecting users.

John... Visio MVP
 
T

Tom Lake

John Marshall said:
The problem is master steve santos AKA PCD has repeated offered
assistance, but failed to mention that his assistance came at a price.

He DOES mention his assistance comes at a price.

"If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee."

That tells me he charges for his services (a very reasonable fee) . He also
answered the OP's question.
As long as he does that, I don't see the problem with his sig.

Tom Lake
 
J

John Marshall, MVP

Thanks Tom, the "failed to mention" was in reference to other posts steve
has made that indicated the poster should call him, but did not mention that
the help was not for free. My post in this thread was not a direct complaint
about steve, but a reply to Joe explaining Jeff's post.

These newsgroups were set up by Microsoft for free support, steve mentioning
that he expects to be compensated, even at a "reasonable fee", is going
against the spirit of these newsgroups. The real problem is that if steve is
allowed to solicit unchallenged, others will wonder why they can not and the
newsgroup will be flooded with clog the newsgroups with solicitations.

John... Visio MVP
 

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