Connecting Tech Pros Worldwide Help | Site Map

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

  #1  
Old November 12th, 2005, 04:43 PM
MLH
Guest
 
Posts: n/a
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.
  #2  
Old November 12th, 2005, 04:43 PM
MLH
Guest
 
Posts: n/a

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


Oops... forgot to mention I was trying to do this from Access 2.0...
(sorry)

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxx

[color=blue]
>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.[/color]

  #3  
Old November 12th, 2005, 04:45 PM
MLH
Guest
 
Posts: n/a

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


Top-o-the-day to ya, Chuck!
'preciate the tip.
  #4  
Old November 12th, 2005, 04:45 PM
MLH
Guest
 
Posts: n/a

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


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[color=blue]
>Shell execute the URL.
>
>On Thu, 20 Nov 2003 15:06:22 -0500, MLH <CRCI@NorthState.net> wrote:
>[color=green]
>>Oops... forgot to mention I was trying to do this from Access 2.0...
>>(sorry)[/color]
>[color=green][color=darkred]
>>>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.[/color][/color][/color]

  #5  
Old November 12th, 2005, 04:45 PM
Arno R
Guest
 
Posts: n/a

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


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" <CRCI@NorthState.net> schreef in bericht news:u2bsrvgt409o0ghigrt359hjk3329e5lkr@4ax.com...[color=blue]
> 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[color=green]
> >Shell execute the URL.
> >
> >On Thu, 20 Nov 2003 15:06:22 -0500, MLH <CRCI@NorthState.net> wrote:
> >[color=darkred]
> >>Oops... forgot to mention I was trying to do this from Access 2.0...
> >>(sorry)[/color]
> >[color=darkred]
> >>>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.[/color][/color]
>[/color]


  #6  
Old November 12th, 2005, 04:45 PM
MLH
Guest
 
Posts: n/a

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


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"
<arracomn_o_s_p_a_m@tiscali.nl> wrote:
[color=blue]
>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...[/color]

  #7  
Old November 12th, 2005, 04:45 PM
Arno R
Guest
 
Posts: n/a

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


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" <CRCI@NorthState.net> schreef in bericht news:o3psrvcqathfj56q8l91t7gabgimsvmbk6@4ax.com...[color=blue]
> 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"
> <arracomn_o_s_p_a_m@tiscali.nl> wrote:
>[color=green]
> >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...[/color]
>[/color]


Closed Thread