Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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 September 22nd, 2004, 06:25 AM
Authorized User
Join Date: Sep 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multi-Column Combo Boxes

I would like create a multi-column combo box in a form that looks up Social Security Number and the associated first and last name. I want the SSN to show up in the SSN field of the form, and then I want to keep this field information as part of the new record. I also want the first and last name to be displayed in the form, but I do not need to save this information as part of the new record. the form has the following records:

First Name
Last Name
Leave Type
Leave Date
Leave Amount.

The underlying record has all of the above fieds, except the First Name and Last Name.

How do I create the objects on the form that will display the First Name and Last Name with the associated SSN.


DJ's Daddy

Old September 22nd, 2004, 12:14 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG

Create one or two UNbound textboxes. If you create two, then on the combobox's AfterUpdate event you put this (assuming the 1st column is SSN, the 2nd is first name, and the third is last name):

Me.txtFirstName = Me.cboSSN.Column(1)
Me.txtLastName = Me.cboSSN.Column(2)

Or if you have just one textbox with the full name:

Me.txtFullName = Me.cboSSN.Column(1) & " " & Me.cboSSN.Column(2)

Note I'm using fake names for things and also note that the first column is Column(0).

Also put the above code in the form's On Current event.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-column combo box in datagridview aad1 C# 0 June 5th, 2006 09:58 AM
Multi column combo lists c_olinrb Access 4 July 21st, 2005 09:21 AM
VS 2005 Beta 2 - DataGridView multi-column combo thespiritual1 .NET Framework 2.0 0 June 24th, 2005 07:43 AM
Multi Functioning Combo Boxes / Probs socoolbrewster Access 3 March 3rd, 2005 04:36 AM
multi-column combo myth12345 VB How-To 1 January 3rd, 2005 04:29 PM

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