Jumat, 19 Februari 2016

Re: [MS_AccessPros] populate text boxes on a form

 

Sarah-


Include the Price column in your query, but set its Display Width to 0.  In the AfterUpdate event of the combo box, you can fetch the value and assign it to Price like this:

    Me.Price = Me.cmbProductID.Column(n)

.. where n is the column number containing the price - with the first column being 0.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)



On Feb 19, 2016, at 1:39 PM, sarahk@schemesoftware.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

I have a combo box on a form that has a table/query as a row source type. The selection in this combo box should populate additional text boxes on the form. For example if a user selects a product, it should automatically populate the price box on the same form. The product and price are in the same table.

How do I do this?

I am using Access 2003.

Thank You 

Sarah


__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

Tidak ada komentar:

Posting Komentar