Solved

MS Access: passing value from combo box to text box

Posted on 2009-04-07
5
434 Views
Last Modified: 2013-11-28
This should be a straightforward question, but I am having trouble figuring it out.

I have a single-record form based on one table.  I put an unbound combo box on the form (in the details section) that pulls its values from the same table:

SELECT tblBorrowInquiries.BorrowerInquiryID, tblBorrowInquiries.BorrowerName FROM tblBorrowInquiries;

I want the combo box to pass the value selected by the user to a text box (txtBorrowerInquiryID which has as its control source BorrowerInquiryID) and thus change the record displayed.  I used the following in the after-update of the combo box:

Me.txtBorrowerInquiryID.Value = Me.cboBorrowerInquirySelect.Value

Needless to say, I am getting the runtime error 2448 when I try to select a new record in my combo box and can't change the text box.  I had this working, but must have changed something.
0
Comment
Question by:Phereklos
  • 2
  • 2
5 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 24088823
just use

Me.txtBorrowerInquiryID = Me.cboBorrowerInquirySelect

0
 
LVL 77

Expert Comment

by:peter57r
ID: 24088868
'and thus change the record displayed'

Can you be quite clear what you mean by this.

Do you mean
A)you want the data in the current record to be modified?
Or
B)Are you trying to move to a different record?

You are doing A, not B.
0
 

Author Comment

by:Phereklos
ID: 24088927
Thanks.  I want to move to a different record.  How do I do that?
0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 24088962
Delete the combo box.
Add it again using the controls wizard and this time choose the option to 'find a record in my form'
0
 

Author Comment

by:Phereklos
ID: 24089163
Thanks.  I had first put the combo box on the form using the wizard, but changed something and it stopped working (still can't figure out why).  Didn't think to simply start over.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

828 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