Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Look up records using a combobox and textbox

Posted on 2013-05-10
4
Medium Priority
?
363 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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

604 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