Automatic FedEx Tracking Search

C

Ceedy

When we send a FedEx package, I have the FedEx tracking number automatically
inserted into a field called [FedExTrackNum]. I'm trying to set up a
"button" that, when pushed will go to the FedEx website and check the status
of that number. I have got as far as entering
"http://www.fedex.com/Tracking?language=english&cntry_code=us&tracknumbers=[FedExTrackNum]"
(no quotes used) into the Hyperlink Address property which goes to the
website but the site says the number "[FedExTrackNum] is invalid. How do I
get it to enter the actual number and not the field name that contains the
number or am I going about this in the wrong way?
Thanks in advance for any help.
 
C

Ceedy

Thank you Clifford. I'm not good at VBA. I copied what you sent to me so the
procedure looks like this:
Option Compare Database
Option Explicit

Private Sub Command107_Click()
FollowHyperlink
"http://www.fedex.com/Tracking?language=english&cntry_code=us&tracknumbers="
& [FedExTrackNum]
End Sub

I get the message:
Compile error:
Expected: line number or label or statement or end of statement.
Did I do it wrong?
--
Ceedy


Clifford Bass said:
Hi Ceedy,

Instead of setting the button's Hyperlink Address add an On Click event
procedure (code). In the subroutine skeleton it creates add this line:

FollowHyperlink
"http://www.fedex.com/Tracking?language=english&cntry_code=us&tracknumbers="
& [FedExTrackNum]

That should do it.

Clifford Bass

Ceedy said:
When we send a FedEx package, I have the FedEx tracking number automatically
inserted into a field called [FedExTrackNum]. I'm trying to set up a
"button" that, when pushed will go to the FedEx website and check the status
of that number. I have got as far as entering
"http://www.fedex.com/Tracking?language=english&cntry_code=us&tracknumbers=[FedExTrackNum]"
(no quotes used) into the Hyperlink Address property which goes to the
website but the site says the number "[FedExTrackNum] is invalid. How do I
get it to enter the actual number and not the field name that contains the
number or am I going about this in the wrong way?
Thanks in advance for any help.
 
C

Clifford Bass

Hi Ceedy,

Unfortunately the discussion group can cause the line to wrap and look
like multiple lines. The part from FollowHyperlink all the way through
[FedExTrackNum] should all be on one line. Or you can split it up with the
use of the continuation character:

FollowHyperlink _
"http://www.fedex.com/Tracking" & _
"?Language=english&cntry_code=us&tracknumbers=" & _
[FedExTrackNum]

Clifford Bass
 
C

Ceedy

Clifford, your great! I did need to add Forms!.... but it works super.
Thank you so much.
--
Ceedy


Clifford Bass said:
Hi Ceedy,

Unfortunately the discussion group can cause the line to wrap and look
like multiple lines. The part from FollowHyperlink all the way through
[FedExTrackNum] should all be on one line. Or you can split it up with the
use of the continuation character:

FollowHyperlink _
"http://www.fedex.com/Tracking" & _
"?Language=english&cntry_code=us&tracknumbers=" & _
[FedExTrackNum]

Clifford Bass

Ceedy said:
Thank you Clifford. I'm not good at VBA. I copied what you sent to me so the
procedure looks like this:
Option Compare Database
Option Explicit

Private Sub Command107_Click()
FollowHyperlink
"http://www.fedex.com/Tracking?language=english&cntry_code=us&tracknumbers="
& [FedExTrackNum]
End Sub

I get the message:
Compile error:
Expected: line number or label or statement or end of statement.
Did I do it wrong?
 
H

hemplady

--
sande


Ceedy said:
Clifford, your great! I did need to add Forms!.... but it works super.
Thank you so much.
--
Ceedy


Clifford Bass said:
Hi Ceedy,

Unfortunately the discussion group can cause the line to wrap and look
like multiple lines. The part from FollowHyperlink all the way through
[FedExTrackNum] should all be on one line. Or you can split it up with the
use of the continuation character:

FollowHyperlink _
"http://www.fedex.com/Tracking" & _
"?Language=english&cntry_code=us&tracknumbers=" & _
[FedExTrackNum]

Clifford Bass

Ceedy said:
Thank you Clifford. I'm not good at VBA. I copied what you sent to me so the
procedure looks like this:
Option Compare Database
Option Explicit

Private Sub Command107_Click()
FollowHyperlink
"http://www.fedex.com/Tracking?language=english&cntry_code=us&tracknumbers="
& [FedExTrackNum]
End Sub

I get the message:
Compile error:
Expected: line number or label or statement or end of statement.
Did I do it wrong?
 
H

hemplady

--
sande


Ceedy said:
Clifford, your great! I did need to add Forms!.... but it works super.
Thank you so much.
--
Ceedy


Clifford Bass said:
Hi Ceedy,

Unfortunately the discussion group can cause the line to wrap and look
like multiple lines. The part from FollowHyperlink all the way through
[FedExTrackNum] should all be on one line. Or you can split it up with the
use of the continuation character:

FollowHyperlink _
"http://www.fedex.com/Tracking" & _
"?Language=english&cntry_code=us&tracknumbers=" & _
[FedExTrackNum]

Clifford Bass

Ceedy said:
Thank you Clifford. I'm not good at VBA. I copied what you sent to me so the
procedure looks like this:
Option Compare Database
Option Explicit

Private Sub Command107_Click()
FollowHyperlink
"http://www.fedex.com/Tracking?language=english&cntry_code=us&tracknumbers="
& [FedExTrackNum]
End Sub

I get the message:
Compile error:
Expected: line number or label or statement or end of statement.
Did I do it wrong?
 

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