find address depending on postcode and H.No

aman

Registered User.
Local time
Yesterday, 22:10
Joined
Oct 16, 2008
Messages
1,251
Hi guys

Is it possible to buid a form where the user just type house no and postcode and the corresponding address should automatically display on the address textboxes.

Can anyone please help me to build this up?

Thanks
Aman
 
Hi guys

Is it possible to buid a form where the user just type house no and postcode and the corresponding address should automatically display on the address textboxes.

Can anyone please help me to build this up?

Thanks
Aman

Possibly. My guess is it depends on what postal code system you are working with. Canada, US, England...
In Canada postal codes can be very rural (encompassing many roads, lanes, areas) or very urban (only a one side of part of a street) or special (representing a government department).

There are over a million codes; about 4000 new codes each year.

What are the other factors in the issue you are trying to solve?
 
Thanks 4 your reply

I want to use UK postcodes to find any address . Can anyone please help me out in this.

Thanks
 
The big question is... do you have a database of addresses to search in. If you are only using you own contacts table then a normal DLookup() approach will suffice. If you want to somehow link to the Post office dbase then be prepared to spend some money.
 
Thanks David, I don't have anything in the database.My manager just asked me can you find the complete address depending upon the postcode and house number entered by the user.
The address will then be stored in the textboxes.

But I don't know how to do it as for this I need all the addresses,house numbers and postcodes then search from the database the record that matches with house number and postcode entered in the textboxes.

I really have no idea thats why I need your help. Shall I buy a software for this but my manager will not agree.


Thanks
Aman

progress.gif
 
Firstly you would need two textboxes for the user to enter the postcode and house number.

Then you would do a DLookup() to see if a record exists that matches the user input. In theory there should be no duplicates. You may have more than one person at that address bt the address should be unique.

If it exists then I would use a recordset to get the address data. This is faster than doing a series of DLookups.

Example:


Code:
Dim Rs As DAO.Recordset
Set Rs = CurrentDb.OpenRecordset("Select * From Addresses Where Postcode =" & Me.TxtPostcode & "' And Address1 Like '" & Me.TxtHouseNo & "*'")

If Not Rs.EOF And Not Rs.BOF Then
   '/Found
   Me.TxtAddress1 = Rs("Adr1")
   Me.TxtAddress2 = Rs("Adr2")
   Me.TxtAddress3 = Rs("Adr3")
   Me.TxtAddress4 = Rs("Adr4")
End If
Rs.Close
Set Rs = Nothing
 
David, Thanks for this but I don't have a list of all addresses in UK. I need to find out the address based on any postcode and house number entered by user. so for this I need a complete database. Can I use any link to the database online that stores all addresses,postcodesa and house numbers respectively.

Thanks
 
If the UK is anything like the NL you will need to PURCHASE a postcode <> street table from the postoffice/AT&T/PTT/whatever company manages it.

Then once you got that (or try and manually type and maintain it yourself) then you can look it up.
If you dont have a source you cannot lookup and it is not 'readily' available online either because that will most probably/definatly be a breach of contract/purchase/copyright/something or other
 
David, Thanks for this but I don't have a list of all addresses in UK. I need to find out the address based on any postcode and house number entered by user. so for this I need a complete database. Can I use any link to the database online that stores all addresses,postcodesa and house numbers respectively.

Thanks

As the others have said, the post offices of the countries involved sell this as a product. It can be quite costly. Also, the postal codes change (Canada about 3-4000 per year). Companies who need this sort of data often buy into an ongoing service where the postal code changes (deletions/replacements/additions) are updated (DVD/online) on a monthly or quarterly basis.

for example
http://www.royalmail.com/portal/rm/jump2?mediaId=400085&catId=400084
 

Users who are viewing this thread

Back
Top Bottom