Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 22nd, 2004, 06:25 AM
Authorized User
Join Date: Sep 2003
Location: Upper Marlboro, Maryland, USA.
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

Reply With Quote
  #2 (permalink)  
Old September 22nd, 2004, 12:14 PM
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
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
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 11:43 PM.

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