By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,184 Members | 1,416 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,184 IT Pros & Developers. It's quick & easy.

How to hit a website OnClick of command button on Access form?

P: n/a
MLH
How can I hit www.someplace.com from an Access form?
I'd like to...
1) open user's default browser (if not already open)
2) type in a URL
3) press enter (or click Go - or - whatever it takes)

I'd like it all to happen when user clicks button on form.
Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
MLH
Oops... forgot to mention I was trying to do this from Access 2.0...
(sorry)

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxx

How can I hit www.someplace.com from an Access form?
I'd like to...
1) open user's default browser (if not already open)
2) type in a URL
3) press enter (or click Go - or - whatever it takes)

I'd like it all to happen when user clicks button on form.


Nov 12 '05 #2

P: n/a
MLH
Top-o-the-day to ya, Chuck!
'preciate the tip.
Nov 12 '05 #3

P: n/a
MLH
I tried the following:

x = Shell("http://www.microsoft.com", 1) #AND#
x = Shell("www.microsoft.com", 1)

.... but Access 2.0 moaned & groaned complaining...
File not found. Error Code 53
Possible causes: A Kill, Name, or Open statement refers to a file that
doesn't exist. Your program tried to call a procedure in a DLL and the
library file name specified in the Lib clause of the Declare statement
can't be found.

I'm afraid I'm still in the dark.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxx
Shell execute the URL.

On Thu, 20 Nov 2003 15:06:22 -0500, MLH <CR**@NorthState.net> wrote:
Oops... forgot to mention I was trying to do this from Access 2.0...
(sorry)

How can I hit www.someplace.com from an Access form?
I'd like to...
1) open user's default browser (if not already open)
2) type in a URL
3) press enter (or click Go - or - whatever it takes)
I'd like it all to happen when user clicks button on form.


Nov 12 '05 #4

P: n/a
You need to include the executable:
With A2.0 this is a PITA (only allows 8.3 format for files) but
x = Shell("C:\Progra~1\Intern~1\Iexplore.exe http://www.microsoft.com", 1) may work...

--
Hope this helps
Arno R
"MLH" <CR**@NorthState.net> schreef in bericht news:u2********************************@4ax.com...
I tried the following:

x = Shell("http://www.microsoft.com", 1) #AND#
x = Shell("www.microsoft.com", 1)

... but Access 2.0 moaned & groaned complaining...
File not found. Error Code 53
Possible causes: A Kill, Name, or Open statement refers to a file that
doesn't exist. Your program tried to call a procedure in a DLL and the
library file name specified in the Lib clause of the Declare statement
can't be found.

I'm afraid I'm still in the dark.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxx
Shell execute the URL.

On Thu, 20 Nov 2003 15:06:22 -0500, MLH <CR**@NorthState.net> wrote:
Oops... forgot to mention I was trying to do this from Access 2.0...
(sorry)

How can I hit www.someplace.com from an Access form?
I'd like to...
1) open user's default browser (if not already open)
2) type in a URL
3) press enter (or click Go - or - whatever it takes)
I'd like it all to happen when user clicks button on form.

Nov 12 '05 #5

P: n/a
MLH
The syntax worked! Thx. Is it equally uncomplicated,
short & sweet to determine if user's default browser is
already open? Keep in mind, the default browser may
not be IE?

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx
On Fri, 21 Nov 2003 16:55:44 +0100, "Arno R"
<ar****************@tiscali.nl> wrote:
You need to include the executable:
With A2.0 this is a PITA (only allows 8.3 format for files) but
x = Shell("C:\Progra~1\Intern~1\Iexplore.exe http://www.microsoft.com", 1) may work...


Nov 12 '05 #6

P: n/a
I just would not bother if the browser is already open.
(Depends on how important this is for your case of course)
I believe IE can open a lot of windows while still using the same resources?

To check for the browser:
Simply let users put the path to their browser in a localTable (TblLocalSettings) and use this path.

--
Hope this helps
Arno R
"MLH" <CR**@NorthState.net> schreef in bericht news:o3********************************@4ax.com...
The syntax worked! Thx. Is it equally uncomplicated,
short & sweet to determine if user's default browser is
already open? Keep in mind, the default browser may
not be IE?

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx
On Fri, 21 Nov 2003 16:55:44 +0100, "Arno R"
<ar****************@tiscali.nl> wrote:
You need to include the executable:
With A2.0 this is a PITA (only allows 8.3 format for files) but
x = Shell("C:\Progra~1\Intern~1\Iexplore.exe http://www.microsoft.com", 1) may work...

Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.