Macro to open specific website...

T

Tony

What I'm trying to do is have a macro:

iemap is the name of it:
openApp
c:\program files\internet explorer\iexplore.exe
http://maps.msn.com/home.aspx?strt1=[street]&city1=[city]&stnm1=[st]&zipc1=[zip]&cnty1=0

I can get it to do just the opening of Internet explorer.

and on my responder table, I have added a text box that gives me the text
equivilent of the above code so it fills in street/city/state/zip with their
info. I have used the macro to open up explorer and then i copy my box and
paste it in the url and it works great, but that's a lot for the user to do.

I wanted to just add a button called map and on the responder form
(frmResponder) to pull those fields and open Internet Explorer and show the
map.

Any ideas would be greatly appreciated!
Thanks in advance!!!
Tony
 
L

Lee-Anne Waters via AccessMonster.com

hi,

have you tried setting it as 'is hyperlink' in the propereties of the text
box..?
 
T

Tony

If I set it up as a hyperlink on my frmResponder form, how would I tie it
into opening up Internet Explorer, and then having it go to the map site and
using their address, city, state, zip?

I have written the text box with the [city] & "city1" & ...etc...so it shows
the exact hyperlink...I will try to set that up to be a hyperlink and use the
text inside of it...but incase I don't get it, do you know what coding I
would need to make the hyperlink go to:http:[mapfield] and then show the text
in the map field?

Thanks!
Tony
 
T

Tony

I tried to set it up as a hyperlink, but I need it to take the text as
written from the text box that gives the full address and populates [street],
[city], [st] and [zip] with the responders info.

Instead, it makes the spaces %20 and changes the brackets also.
http://maps.msn.com/home.aspx?strt1="&[Street]&"&city1="&[City]&"&stnm1=WY&zipc1="&[ZIP]&"&cnty1=0

When it should be populating from the users form as it shows in my text
box:="http://maps.msn.com/home.aspx?strt1=" & [Street] & "&city1=" & [City] &
"&stnm1=WY&zipc1=" & [ZIP] & "&cnty1=0"

Thanks for any input that will solve this!
Tony

Tony said:
If I set it up as a hyperlink on my frmResponder form, how would I tie it
into opening up Internet Explorer, and then having it go to the map site and
using their address, city, state, zip?

I have written the text box with the [city] & "city1" & ...etc...so it shows
the exact hyperlink...I will try to set that up to be a hyperlink and use the
text inside of it...but incase I don't get it, do you know what coding I
would need to make the hyperlink go to:http:[mapfield] and then show the text
in the map field?

Thanks!
Tony

Lee-Anne Waters via AccessMonster.com said:
hi,

have you tried setting it as 'is hyperlink' in the propereties of the text
box..?
 
S

Steve Schapel

Tony,

Just a thought... maybe you could try concatenating your URL string
together in a calculated field in a query, and then bind your form
textbox to the query field?
 
T

Tony

Thanks for the idea Steve. I looked at my db really quick and can't figure
out what "wording" I would need to make that happen. Do you know what I
would write in the query (and where) to make it show that as the data? I
have done it on a form with the below text, but not in a query before.

I have a field called STREET, CITY, ST, ZIP and those are the fields I need
to pull from to make that string into:
="http://maps.msn.com/home.aspx?strt1=" & [Street] & "&city1=" & [City] &
"&stnm1=WY&zipc1=" & [ZIP] & "&cnty1=0"

Thanks again!
Tony

Steve Schapel said:
Tony,

Just a thought... maybe you could try concatenating your URL string
together in a calculated field in a query, and then bind your form
textbox to the query field?

--
Steve Schapel, Microsoft Access MVP

I tried to set it up as a hyperlink, but I need it to take the text as
written from the text box that gives the full address and populates [street],
[city], [st] and [zip] with the responders info.

Instead, it makes the spaces %20 and changes the brackets also.
http://maps.msn.com/home.aspx?strt1="&[Street]&"&city1="&[City]&"&stnm1=WY&zipc1="&[ZIP]&"&cnty1=0

When it should be populating from the users form as it shows in my text
box:="http://maps.msn.com/home.aspx?strt1=" & [Street] & "&city1=" & [City] &
"&stnm1=WY&zipc1=" & [ZIP] & "&cnty1=0"

Thanks for any input that will solve this!
Tony
 
S

Steve Schapel

Tony,

Exactly the same, except for the = at the beginning. Just type it into
the Field row of a blank column in the query design grid.
 

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