I am trying to make database for my company. Was just working on makingdatabase entry easier by autopopulating fields in form based on the selectionof a value in one field in the same form? I have City, State and Post code inmy main table to be filled out for a particular costumer. What I wanna do in myform is select city from a combo box named “city” and it should autopopulatethe fields “state” and “post code” in the same form. The code that I havewritten in afterchange event of “city” is below
Private Sub cboCity_Change()
Me.txtState.Value = Me.cboCity.Column(1)
Me.txtPCode.Value = Me.cboCity.Column(2)
End Sub
But when I run this code and select a value from thedropdown list of “city” the field of "state" autopopulates but "Post code" doesnotfor some reason I don’t know why? I have tried everything but couldn’t work itout.
Please help, thanks and regards,
Muddasir Masood.