Form Combo Box new values update to table automatically

Davidekreed

Registered User.
Local time
Today, 16:22
Joined
Oct 15, 2001
Messages
12
I have two combo boxes in a form, one for post codes and one for suburb name which automatically fill in details for state and the remaining field, post code or suburb (whichever was not entered)
The code looks like this, where Combo20 is the name for suburb, and combo 22 is the name for post code:

Private Sub Combo20_AfterUpdate()
Me.Combo22 = Me.Combo20.Column(0)
Me.City = Me.Combo20.Column(3)
Me.State = Me.Combo20.Column(4)
End Sub

Private Sub Combo22_AfterUpdate()
Me.Combo20 = Me.Combo22.Column(2)
Me.City = Me.Combo22.Column(3)
Me.State = Me.Combo22.Column(4)
End Sub

I have a table with the post code information on it which the combo boxes are based on.

My first question is, how am I able to type in a new suburb or post code into the combo box field in the form which I don't have in the table. In other words, i need to override the combo box values sometimes.

Secondly, I would then like this new suburb or post code information to be saved back to the post code table automatically.
I need to do this because new suburbs may be created, and my post code table may not be an exhaustive list.

Any ideas would be greatly appreciated.

Dave
 
Thanks Jack...I'll check it out!!!
 

Users who are viewing this thread

Back
Top Bottom