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 VBA
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 February 26th, 2005, 05:51 PM
Registered User
Join Date: Jan 2005
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default binding recordset with combo problem

Hello Everyone,
I am stuck in a problem for many days now.
In the form, on which I am working, there are 2 dropdown lists (combo box).
The data in the first combo is coming from a list and in the second combo, I am running a query, and depending upon the selection in the first combo, the data in the second combo may come from one of many tables in the database.
What I want is to have control over the data, before it is being displayed in the second combo, as the data in have many null and 'same name' entries. But what I don't want is to change the original data in the tables.

Till now, I have been trying to make use of persistant recordset, that is, by storing the recordset in an external table, changing its data and binding it to the second combo. But I am unable to bind the data.

What in your opinion, is the best approach to accomplish this. A snippet will be of great help as I am not a experienced programmer.


Reply With Quote
  #2 (permalink)  
Old February 28th, 2005, 04:10 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts


   Open the query for the second combo box and use SELECT DISTINCT to select distinct values in your look up column. THis should work. I made a Table called Table1, populated it with many duplicate values, and then wrote this query, which only comes up with one entry for each value, thus removing duplicates:

FROM Table1;

   You may have a problem if your combo box is binding to another column.


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
Binding Column Name to a Combo Box. jitu ADO.NET 3 June 27th, 2013 07:35 AM
Combo Box Complex Binding Example? pigparent VB Databases Basics 2 June 11th, 2008 12:08 PM
Binding a datagrid to a recordset roykennedy VB Databases Basics 4 October 28th, 2005 02:15 PM
Image Combo binding Awesomo Pro VB Databases 0 June 21st, 2005 06:28 AM
Weird Combo Box Data Binding Problem kpowers@wppisys.org VB.NET 1 February 12th, 2005 04:52 PM

All times are GMT -4. The time now is 09:55 AM.

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