|
-
Apr 5th, 2005, 06:26 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] Using combos
i want to load data into to a combobox in VBA, however i dont know how to get it like in vb.net where you can specify the value member and the display member.
As i want to load my table ie: mytable(col1,col2) into the combobox and show the values of col2 in the combobox but when the user selects an item i need to get the col1 value of the selected item
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Apr 5th, 2005, 12:13 PM
#2
Re: Using combos
Which Office program are you using? Access or Excel?
Is it interacting with vb.net?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 6th, 2005, 04:08 AM
#3
Thread Starter
Fanatic Member
Re: Using combos
access 2002 no its not interacting with vb.net
was just trying to get it like the way it is done in .net where you can get the selectedvalue
Also how can i display both the fields in the combo when an item from the list is selected..... i can get it to show the fields when the user does the drop down but when they select an item it just shows the one field
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Apr 6th, 2005, 04:48 AM
#4
Junior Member
Re: Using combos
You can code in your program :
combobox.boundcolumns = "col1"
combobox.listfield = "col2"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|