Automatic FedEx Tracking Search

  • Thread starter Thread starter Ceedy
  • Start date Start date
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.
 
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.
 
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
 
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?
 
--
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?
 
--
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?
 
Back
Top