I'm kind of new to this so please forgive, if I'm asking a somewhat basic
question. I have a supplier database that I'm trying to setup. I thought it
would be really keen to set it up so that when you entered the country it
would automatically list the international calling code in a text box next to
it for reference. Had no idea how difficult it would be!
What I thought I should do is create second table and corresponding form for
adding a country which stores the name of the country and its corresponding
calling code. Then I would use a combo box on my Add Supplier Form which
users would use to select the country, and once selected would cause the text
box for the dialing code to be automatically filled in by the corresponding
calling code of that country.
Any suggestions for how I would go about this? Its a fairly basic thing, I
think...
Cheers,
Craig
United Kingdom
Douglas J. Steele - 15 May 2005 17:48 GMT
Let's assume that the recordsource populating your combobox has two fields
in it: CountryCd and DialingCd, in that order.
In the combobox's AfterUpdate event, put code to populate the DialingCd text
box:
Me.txtDialingCd = Me.cboCountry.Column(1)
The Column collection starts at 0, which is why you use Column(1) to refer
to the second column.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> I'm kind of new to this so please forgive, if I'm asking a somewhat basic
> question. I have a supplier database that I'm trying to setup. I thought
[quoted text clipped - 22 lines]
> Craig
> United Kingdom