Forms

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

Hello,

I am trying to program a button on a form to launch IE
with an URL but within the url I am trying pass the data
from a field within the form. I have setup the following
so far;


Private Sub Command79_Click()
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = 1

objIE.Navigate "http://aws1.co.wake.nc.us/realestate/Accoun
t.asp?id=123456"

End Sub

The 123456 is an id number, however each one of my records
in the access database has a unique number. What I am
trying to do is have the ID number of the current record I
am viewing be automatically inserted in to this part of
the url. I am sure it is an easy task but I am new to VB.

Thanks in advance
Steve
 
I believe you need to first concatenatea string:

dim myUrl as string
dim myId as long? I am assuming your is an auto numbered
field,

myId=me![myIdfield]

myUrl="http://aws1.co.wake.nc.us/realestate/Account.asp?
id="&myId

for debugging purposes print tis to the immediate window
using Debug.Print myUrl. I think this will work.

Hope this helps!

Kevin
 
Back
Top