Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 12th, 2007, 12:40 AM
Authorized User
 
Join Date: Sep 2006
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Combo box updating textbox

Hey all

i have a combo box called cboSiteSub and a text box called post_code
i have a table linked to the combo box with two columns "Suburb" and "postcode" i have been able to get the postcode to appear in the postcode textbox when the corrosponding suburb is selected.

i used this code:

Private Sub cboSiteSub_AfterUpdate()
Me.Post_Code.Value = Me.cboSiteSub.Column(1)
End Sub

this all works fine. but now i want to reverse it aswell so if the postcode is typed in the text box, the corrosponding suburb is entered

Hope this makes sence

Thanks in advance

 
Old January 12th, 2007, 12:26 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Private Sub Post_Code_AfterUpdate()
Me.cboSiteSub = Me.Post_Code
End Sub

???

mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo box to display items from parent combo box Gini Visual Studio 2008 0 June 18th, 2008 12:30 AM
Count in combo box(display results in text box) mboyisis Access 4 April 4th, 2008 07:08 AM
Combo box choice creating filtered combo box stevensj5 Access 11 September 13th, 2007 11:33 AM
combo box and textbox problem Rudner VB Databases Basics 1 November 23rd, 2004 09:09 AM
Populate List Box by Combo Box Selection mmcdonal Access 2 June 15th, 2004 12:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.