|
Add button to your Application, to
activate the Zip code Address search, using
the following code. VB.NET/Visual
Basic Zip code Address Search Code: 'Open
Zip code Address Search object to perform search
Dim LookupSoftware As Object
Set LookupSoftware = GetObject("", "COMAddress.Lookup")
With LookupSoftware
' US=Zip code search,UK=Postcode address Search
.SearchType = "US"
'To prime search box from your application
.SearchPrima = ""
'Set search window Title
.SearchTitle = "Search Example"
'Show Address Search window
If .SearchForCode() Then
'Fill in returned address data
Me.Company = .CompanyName
Me.Line1 = .Line1
Me.Line2 = .Line2
Me.Line3 = .Line3
Me.Town = .Town
Me.State = .CountyState
Me.Zipcode = .PostZipCode
Me.Country = .Country
Else
'Zip code Address Search cancelled
End If
End With
Set LookupSoftware=nothing
COMAddress.Lookup is a COM
object, which in the above example is being used in VB, but the same
object could easily be used with VB.NET, Delphi, and another
language which allows you to create and use a COM object
|