prmitchell
Registered User.
- Local time
- Today, 21:47
- Joined
- Jan 2, 2013
- Messages
- 58
I wish to add to a form the interface that allows the user to type in a postcode and the system then displays the suburbs that match that postcode and the user then selects the correct suburb (for where they live).
The structure I have is a PostcodesAndSuburbs table with the fields
Postcode
Suburb
State
PCode (PK)
PCode being necessary because neither postcode and suburb are unique. The values stored in PCode are the concatenation of the postcode and the suburbs initial(s). So on a form I have a combo box looking up the values in PCode,. So if the user types in the four digits of the postcode and then clicks the drop-down arrow a list will show and the suburbs with that postcode will appear at the top of the list and if the user selects the correct suburb then fine - all working.
But this is just a little different from the interface that exists now in many places (webpages) where you type in the postcode - and on entering the fourth digit a list appears - and the list only contains the suburbs that match the four digits.
So my pseudocode for this is
OnChange (Or OnEnter)
when fourth digit entered
run a query
Where Me.PCode = [PostcodesAndSuburbs].[Postcode]
which is behind the combo box allowing the user to select the suburb
but I am not sure how to put this into reality.
Thank you in anticipation.
The structure I have is a PostcodesAndSuburbs table with the fields
Postcode
Suburb
State
PCode (PK)
PCode being necessary because neither postcode and suburb are unique. The values stored in PCode are the concatenation of the postcode and the suburbs initial(s). So on a form I have a combo box looking up the values in PCode,. So if the user types in the four digits of the postcode and then clicks the drop-down arrow a list will show and the suburbs with that postcode will appear at the top of the list and if the user selects the correct suburb then fine - all working.
But this is just a little different from the interface that exists now in many places (webpages) where you type in the postcode - and on entering the fourth digit a list appears - and the list only contains the suburbs that match the four digits.
So my pseudocode for this is
OnChange (Or OnEnter)
when fourth digit entered
run a query
Where Me.PCode = [PostcodesAndSuburbs].[Postcode]
which is behind the combo box allowing the user to select the suburb
but I am not sure how to put this into reality.
Thank you in anticipation.