473,382 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

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
6 5105
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
MLH
Top-o-the-day to ya, Chuck!
'preciate the tip.
Nov 12 '05 #3
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Zalek Bloom | last post by:
Hello, Here is my problem: I am displaying to a user a row of buttons. Depending on which button user presses, I want to go to a different URL and to give a different value to a hidden...
14
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons...
0
by: none | last post by:
Hi, I’ve got a problem with my onclick handlers for command buttons being dropped on page render for a popup window. On the opening window, I have several command buttons, and they all have...
4
by: John Smith | last post by:
I have a continuous form. there is a command button with the following code for the OnClick event: DoCmd.OpenForm "frmPlants", , , "PlantsID =" & Me!PlantsID I click the button and frmPlants...
3
by: Hitesh Joshi | last post by:
Hi, I have a small access db. In that db, I need to access some data from a website. This website has authetication page login.asp. Is there way I can login to this webserver from access and...
5
by: Rajkiran R.B. | last post by:
I want to log in to a website using C# code.. The main aim is to check whether the username and password I provide is correct or not. I used the following code bool somefunction() {...
21
by: brucedodds | last post by:
I have an Access 2003 form bound to a SQL Server table via ODBC. Often clicking a button on the form has the effect of requerying the form rather than firing the OnClick event. Does anyone have...
1
by: Adelaide | last post by:
I have been trying to create a quiz for my website and I am confused. This is the code I am using but it doesn't seem to be showing up when I preview in a browser. I have this in the head ...
2
by: DavidGeorge | last post by:
In an earlier thread I recounted a problem I was having, but it took a while to reduce the problem to it's basic components and the issue became somewhat confused in reaching that point. I hope you...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.