?
Solved

Look up records using a combobox and textbox

Posted on 2013-05-10
4
Medium Priority
?
360 Views
Last Modified: 2013-05-29
I have an access form with a combobox and a textbox on it.

I have a table with 4 fields.  Fields 1, 2 and 3 combined make up the primary key.  Field 4 is a currency field.

The combo box uses Fields 1, 2 and 3 to look up a record.  I want Field 4 of the record to be displayed in a textbox for editing.  How do I do this?  Thanks.
0
Comment
Question by:dbfromnewjersey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 40

Expert Comment

by:als315
ID: 39155918
May be you can upload sample DB with this form and table only?
0
 

Author Comment

by:dbfromnewjersey
ID: 39155980
All I want is for Field4 to be displayed in a textbox when a selection is made from the combobox.   The combobox uses the primary key (Field1,Field2 and Field3) to look up a record. I just want Field4 of that record to be displayed in a textbox.

To simplify even more, presume the table only has 2 fields.  Say Field1 is the primary key and Field2 is a currency field. I use the combobox to select a Field1 value.  I want the associated Field2 value to be displayed in the textbox upon a combobox selection.
0
 
LVL 40

Assisted Solution

by:als315
als315 earned 200 total points
ID: 39156131
You've started from:
"to be displayed in a textbox for editing" - do you like to edit record in table or only display it?
For second:
Add to form unbounded field and assing it's value to:
=[ComboBoxName].[Column](1)
Column numbers are started from 0.
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 800 total points
ID: 39157050
dbfromnewjersey
<May be you can upload sample DB with this form and table only? >
Agreed, from your experience here you know that posting a sample a sample db always makes it easier to see what you have, thus shortening the time to get a solution...
;-)

In any event I am not quite sure how your combobox "Looks up" a record, but if it finds the Primary key, you can move to that record and display/edit the Price field (using a bound form)

You can also use an SQL update query if the form is unbound

Sample of both attached
Database221.mdb
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question