Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 13th, 2004, 09:41 PM
Registered User
Join Date: Jun 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Form help

I have a table which I made a form from. The fields in the table include - OrderID, Product, ProductPrice, DeptID, and Quantity.Product and DeptID both have lookup fields with the different dept. and products in a combo box. Is there a way that I can get my price to automatically appear in its cell when I click on the Product from its combo box. I know it can be done but I'm not sure quite how to do it. Thanks

Old July 14th, 2004, 08:00 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG

You can make the Product combobox have TWO columns: the product name and its price. Then on the combobox's AfterUpdate event you can have something like

Me.txtPrice = Me.cboProduct.Column(1)

That will put the price in the textbox based on the price in the combobox's second column.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Old July 14th, 2004, 09:10 AM
Registered User
Join Date: Jun 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Thank you for the information. I got the 2 columns in the combo box but I didn't get selected products price which is based on the combobox's second column to go into the text box.I entered what you suggested, when that didn't work I replaced Me.txtPrice with Me.txtProductPrice. I put this code into the combobox's AfterUpdate event. I tryed several other ways with no success. I know it's a simple thing I'm doing wrong. Any other suggestions. Thanks

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set a form as startup form in vb.net 2.0 mallikalapati .NET Framework 2.0 1 February 21st, 2008 09:19 AM
Close all MdiChield form from open one form/Button salman .NET Framework 2.0 6 December 10th, 2007 03:21 AM
Firefox Error when Form Floated / Form locks socoolbrewster CSS Cascading Style Sheets 5 October 6th, 2007 09:59 PM
How to refresh owner form on closing of child form akumarp2p C# 2005 0 December 22nd, 2006 10:27 AM
parent form from child form - urgent plz netfresher C# 1 November 8th, 2006 06:59 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.