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 November 9th, 2004, 03:10 PM
Registered User
Join Date: Nov 2004
Location: Harrisburg, PA, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Listbox selection in a form

I'm attempting to do the following and am having no real luck doing it. I am setting up a small contact management database and want all my contacts to be classified as contact types. Each individual contact can be more than one contact type.

So what I have right now is a field in my contact table called contacttypeid. There is another table called contacttype that houses each contact type referenced by contacttypeid. I have also established a relationship between the two contacttypeid fields. What I am trying to do on the initial form (where general contact info is entered) is populate a contact type listbox that allows the user to select multiple contact types.

I am trying to have the list box be populated by the values in the contacttype table and I want the results stored in the contacttypeid field in the main contact table.

Currently, I have my listbox name as contacttypeid, the control source is contacttypeid. The row source type is set to table/query, and the row source is currently a sql statement:

SELECT [Contacttypes].[Contacttype] FROM [Contacttypes] ORDER BY [Contacttypes].[Contacttype];

which gives me no data returned in my listbox.

Any suggestions as to what I'm missing?

John Coutts
Reply With Quote
  #2 (permalink)  
Old November 10th, 2004, 05:02 PM
Registered User
Join Date: Nov 2004
Location: , QLD, .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

John - I suspect that your approach may make it difficult to do anything with the field when you populate it.

I would have a series of Check Boxes on your form which are bound to Yes/No fields in the contact table. This is simple for the user and easier for you for queries etc.

Hope this helps .... Peter

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
About listbox selection mode chandra_yvr ASP.NET 2.0 Basics 1 April 3rd, 2007 07:50 AM
ListBox Item selection caterpillar ASP.NET 1.0 and 1.1 Professional 1 July 26th, 2006 12:50 PM
ListBox Value Selection problem caterpillar General .NET 0 July 26th, 2006 11:41 AM
Multiple Selection of Listbox jasminecyriac ASP.NET 2.0 Basics 0 June 22nd, 2006 05:20 AM
listbox selection jon23d Access VBA 1 June 21st, 2005 01:35 PM

All times are GMT -4. The time now is 01:35 AM.

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