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 November 9th, 2004, 03:10 PM
Registered User
 
Join Date: Nov 2004
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?

Thanks,
John Coutts
 
Old November 10th, 2004, 05:02 PM
Registered User
 
Join Date: Nov 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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






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





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