Search EggHeadCafe's Job Board
EggHeadCafe Silverlight WPF ASP.NET VB.NET C# Excel SQL Server SharePoint
search
MicrosoftArticlesForumsFAQs
C# .NET
VB.NET
Visual Studio .NET
ADO.NET
Xml / Xslt
VB 6.0
.NET CF
GDI+
LINQ
Deployment
Security
FoxPro
Silverlight / WPF
Entity Framework
RIA Services

WebArticlesForumsFAQs
JavaScript
ASP
ASP.NET
WCF

DatabasesArticlesForumsFAQs
SQL Server
Access
Oracle
MySQL
Other Databases

OfficeArticlesForumsFAQs
Excel
Word
Powerpoint
Outlook
Publisher
Money

Non-MicrosoftArticlesForumsFAQs
NHibernate
Perl
PHP
Ruby
Java
Linux / Unix
Apple
Open Source

Operating SysArticlesForumsFAQs
Windows 7
Windows Server
Windows Vista
Windows XP
Windows Update
MAC
Linux / UNIX

Server PlatformsArticlesForumsFAQs
BizTalk
Site Server
Exhange Server
IIS

Graphic DesignArticlesForumsFAQs
Macromedia Flash
Adobe PhotoShop
Expression Blend
Expression Design
Expression Web

OtherArticlesForumsFAQs
Lounge
Subversion / CVS
Ask Dr. Dotnetsky
Active Directory
Networking
Uninstall Virus
Job Openings
Product Reviews
Search Engines
Resumes

 

  View Other Microsoft Access Posts   Ask New Question  Ask New Question With Power Editor

List box used to display varying data?
G James posted at Tuesday, November 03, 2009 12:19 PM

Hi, I hope I can explain this properly.

I have a switchboard page for searching records in my database, and on this page, there are several selections for searching, such as: By Committee, By Cost Centre, By Status, etc.  When the user selects any of these options, I want the related table values to appear in a list box that is also on the same switchboard page.  So for Committee, I want the list box to display the value of the Committee table that I have previously created, which has 35 committees available.  However, I would like the list box to remain blank until the user selects the search criteria, which they would do by clicking on a command button.  Then I want the list box to populate the values.

Can this be done, and if yes, how would I do it?

Any help would be greatly appreciated.  Thanks in advance!

G

Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0
Unbound List Control
Dean Lavell provided a rated reply to G James on Tuesday, November 03, 2009 8:02 PM

You want to create an unbound rowsource (nothing assigned to the rowsource property) list box control and assign the rowsource using VBA. Create each of the queries that answer each of the combo boxes. Then for each of the combo boxes' After Update event assign the appropriate query to the list boxes' rowsource.

As an example, say you made a query called Committees selecting the info you want in the list box. I will call the list box lstSelectValue and the committee combo box cboCommittee. Then in the cboCommittee combo box After Update event put:

Me.lstSelectValue.Rowsource = "Committees"

Hopefully you have basic VBA skills to accomplish the above. Let me know if not.

Reply    Reply Using Power Editor
  Rank Winnings Points
November 21 $0.00 14
October 13 $0.00 77

Worked perfectly!
G James replied to Dean Lavell on Wednesday, November 04, 2009 8:12 AM

Thanks so much Dean!  That worked exactly as I imagined it.  I really appreciate your help.

G

Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0