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 > Textbox returning value based on object

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-08-11, 10:17
lordofbeond lordofbeond is offline
Registered User
 
Join Date: Jul 2011
Posts: 1
Textbox returning value based on object

What I'm trying to do is make a textbox return the "classdescription" from a table where I use a combo box to select it. I managed to get the information to display for last name but it was only because the linked table had the field I need.
I have attached a picture of what I'm trying to do
Attached Thumbnails
Textbox returning value based on object-return-driver-input.png  
Reply With Quote
  #2 (permalink)  
Old 07-09-11, 00:31
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
You can assign the RowSource property of the combo to a query that associates both table (using an INNER JOIN). You can retrieve the value of a specific column from a combo using the following syntax:
Code:
MyTextBox.Value = MyCombo.Column(n)
With n being the index of the column (0 for the first [leftmost] column, 1 for the second... etc.). You can hide the columns you do not want to see by properly setting the ColumnWidths property of the combo.
__________________
Have a nice day!
Reply With Quote
Reply

Tags
access 2007, forms, visual basic

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