My Assistant
|
|
Mar 30 2012, 04:44 AM
Post
#1
|
|
|
UtterAccess Enthusiast Posts: 69 |
Hi,
On an Access Form used to enter supplier invoices, when a SupplierID is selected in one textbox and 'focus' goes elsewhere I'd like default data from related fields in my tblSuppliers table to appear in corresponding textboxes. So for instance, in tblSuppliers, the record for SupplierID 200 has a DefaultTaxCode of 5 and a DefaultProjectCode of 07.1. On Lost Focus when a SupplierID has been selected (from a dropdown menu of valid SupplierIDs) I'd like to see the value 5 appear in the textbox 'txtTaxCode' and 07.1 appear in the textbox 'ProjectCode'. Of course the user has the option of leaving these as they are or changing them as necessary before submitting the record. I know how to set the 'On Lost Focus' to trigger the code. I know how, in the VBA Code window, to set the value of a textbox to something such as the value of another textbox or a default value. I also know how, in the VBA Code window, to take the value of a textbox and to use DoCmd.RunSQL to Insert it into a database. Is it just as simple to obtain the values of fields from a record in my tblSuppliers so they appear on the form? Any assistance appreciated (IMG:style_emoticons/default/smile.gif) Ap |
|
|
|
absoprob Fetching Values From A Record To Place In Form Textboxes Mar 30 2012, 04:44 AM
multicoat I suggest that the Tax Codes themselves be stored ... Mar 30 2012, 05:00 AM
BruceM QUOTE SupplierID is selected in one textbox
If you... Mar 30 2012, 06:14 AM
absoprob Chris, Bruce,
Sorry for delay in response but I w... Apr 1 2012, 10:42 AM
BruceM We're both glad to help. Value lists are quit... Apr 2 2012, 06:15 AM![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 22nd May 2013 - 11:35 PM |