473,508 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

URL and table fields

Hi,

I have 2 fields in a table named TRACKING and DATE.

How do I go about having a command button so that the 2 fields are put into
a url then launched in a web browser?

Basically it works like mail merge...for example
http://www.abc123.com/ID?<<TRACKING>>&DATE=<<DATE>>

Any help would be great...

Kind Regards
Blue Bell Trading

+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++

Blue Bell Trading
Nov 13 '05 #1
3 1246
Nick J wrote:
Hi,

I have 2 fields in a table named TRACKING and DATE.

How do I go about having a command button so that the 2 fields are put into
a url then launched in a web browser?

Basically it works like mail merge...for example
http://www.abc123.com/ID?<<TRACKING>>&DATE=<<DATE>>

Any help would be great...

Kind Regards
Blue Bell Trading

+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++

Blue Bell Trading


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Have you tried FollowHyperlink?

' Get the tracking & date values. u could also use a query
' but this is simpler to show.
strTracking = DLookup("Tracking", "table_name", "<criteria>")
strDate = DLookup("[Date]", "table_name", "<criteria>")

' use Replace() function to put in values
dim strURL as string
strURL = "http://www.abc123.com/ID?|1&DATE=|2"
strURL = Replace(strURL, "|1", strTracking)
strURL = Replace(strURL, "|2", strDate)

' Open in internet browser
Application.FollowHyperlink strURL, , True

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQiUfCoechKqOuFEgEQIJlgCdEKiA809r6f/jU4Jg+DCBHYlAj5oAn2r4
yAOTD5ihIUIiGrMbVdycIJoC
=82JU
-----END PGP SIGNATURE-----
Nov 13 '05 #2
You could try this.

In your form, you must have text boxes named TRACKING and DATE. Build an
event that is triggered by clicking the button and insert the following
code:

On Error GoTo ErrorHandler

Dim Website As String

Website = "http://www.abc123.com/ID?" & Me.TRACKING & "?DATE=" & Me.DATE

Application.FollowHyperlink Website, , True

ErrorHandler:
MsgBox "Error: " & Err.Number & " " & Err.Description
Exit Sub

Linda
"Nick J" <bl*************@blueyonder.co.uk> wrote in message
news:bd******************@fe1.news.blueyonder.co.u k...
Hi,

I have 2 fields in a table named TRACKING and DATE.

How do I go about having a command button so that the 2 fields are put
into
a url then launched in a web browser?

Basically it works like mail merge...for example
http://www.abc123.com/ID?<<TRACKING>>&DATE=<<DATE>>

Any help would be great...

Kind Regards
Blue Bell Trading

+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++

Blue Bell Trading

Nov 13 '05 #3
Thanks!

--
Kind Regards
Blue Bell Trading

+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++

Blue Bell Trading
"Nick J" <bl*************@blueyonder.co.uk> wrote in message
news:bd******************@fe1.news.blueyonder.co.u k...
Hi,

I have 2 fields in a table named TRACKING and DATE.

How do I go about having a command button so that the 2 fields are put into a url then launched in a web browser?

Basically it works like mail merge...for example
http://www.abc123.com/ID?<<TRACKING>>&DATE=<<DATE>>

Any help would be great...

Kind Regards
Blue Bell Trading

+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++

Blue Bell Trading

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4455
by: deko | last post by:
How to run action query against linked table? I have an Access 2003 mdb with an Excel 2003 Workbook as a linked table. When I attempt to run an action query against the linked table I get this...
6
18817
by: Paul | last post by:
I was wondering if anyone has had an issue where using vba code to read an excel file and import the data into an access table some records are not imported from the excel file. It seems looking at...
9
6771
by: PeteCresswell | last post by:
I've got something called "Reference Rates". The idea is that on a given day, we have various rates of return for various entities. e.g. Libor 3-month return, Libor 6-month return, US Treasury...
4
3110
by: Bob | last post by:
Hi all, I'm trying to import data, modify the data then insert it into a new table. The code below works fine for it but it takes a really long time for 15,000 odd records. Is there a way I...
2
1820
by: sri20 | last post by:
Set tblNew_Cycle = db.CreateTableDef(New_Cycle_Name) 'Adding Fields to the Table tblNew_Cycle.Fields.Append tblNew_Cycle.CreateField("Test_Cycle", dbText) tblNew_Cycle.Fields.Append...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3194
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1557
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.