If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Combo Box HELP!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-18-10, 10:09
ehabo ehabo is offline
Registered User
 
Join Date: Dec 2010
Posts: 3
Thumbs up Combo Box HELP!

Hello all,

I have an access 2010 conracts web db where i have a 'batch' field to group clients on a contacts table.

I have a combo box where upon batch selection from the list all contacts belonging to that batch# will be displayed along with a few records like their contactname, company, email etc. The form should not display anything until a selection is made from the combo box if possible.

So far I have been trying to get the combo box list to remove duplicate batch numbers but no luck either

Settings for the cmbBatch are:
Control Source: Batch (from main table contacts)
Row Source: Contacts
Row Source Type: Table/Query
Limit to List: Yes
Inherit Value List: Yes
After Update: GOT NOTHING HERE

The settings for the form itself are:
Record Source: Contacts
On Current:
On Load:

If it helps this what the forms looks like now http://farm6.static.flickr.com/5284/...1147a590ec.jpg

I am new to access and downloaded a few example dbs but didnt help much, so ANY help will be very much appreciated!!
Reply With Quote
  #2 (permalink)  
Old 12-24-10, 02:48
tvdrajkumar tvdrajkumar is offline
Registered User
 
Join Date: Dec 2003
Posts: 24
Question

Quote:
The form should not display anything until a selection is made from the combo box if possible.
which combobox....
BTW why don't you make a query to populate the combo instead of directly interfacing the underlying table
Reply With Quote
  #3 (permalink)  
Old 12-26-10, 01:29
ehabo ehabo is offline
Registered User
 
Join Date: Dec 2010
Posts: 3
Quote:
Originally Posted by tvdrajkumar View Post
which combobox....
BTW why don't you make a query to populate the combo instead of directly interfacing the underlying table
Hi, the combo box im referring to is named cmbBatch and is in the header section of the form (http://farm6.static.flickr.com/5284/...1147a590ec.jpg)

I have this query to populate the contents in the combo box list row source:
Code:
SELECT DISTINCT Contacts.[Batch] FROM Contacts WHERE Contacts.Batch Is Not Null ORDER BY Contacts.[Batch];
Only thing I havent been to complete is the required afterupdate code. Any ideas or suggestions will go a long way =)
Reply With Quote
  #4 (permalink)  
Old 01-04-11, 13:56
ehabo ehabo is offline
Registered User
 
Join Date: Dec 2010
Posts: 3
Works fine now, finally figured out the afterupdate macro. For those interested this is the code I used:

http://farm6.static.flickr.com/5170/...cdb99715c5.jpg
Reply With Quote
Reply

Tags
afterupdate, combo box, rowsource

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 On
Pingbacks are On
Refbacks are On