Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2007

Tip: Looking for answers? Try searching our database.

Using one field to poulate others

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
danny.jurmann@brentpct.nhs.uk - 15 Mar 2007 17:42 GMT
I am sure this is a common question...but I could not find the answer.

I have a form where purchases are recorded (stock table) and it has a
supplier name field, with additional supplier details such as address
below all stored on the (supplier table).

When the supplier name is entered into the form I would like the
address field etc to be automatically populated but I am at a loss how
to do this.  Can anyone help?

Many thanks,

Danny
Ofer Cohen - 15 Mar 2007 19:29 GMT
Create a comboBox that Include all the fields that you want to display in the
form.
It's better to select from a combo, that way the user can't enter customers
that don't exist.

Select CustName, Address, Phone From TableName

On the after update event of the combo box, you can write the code
Me.Address = Me.ComboBoxName.Column(1)
Me.Phone = Me.ComboBoxName.Column(2)

Or
You can write in the ControlSource  of each field
In the Address field
=[ComboBoxName].Column(1)

In the Phone field
=[ComboBoxName].Column(2)

Note: The column number of the list box start with 0 and up
I rather using this method
=========================================

Another method will be, check this link on "Fill Fields automatically on
form based on a control's value"

http://www.mvps.org/access/forms/frm0009.htm

Signature

Good Luck
BS"D

> I am sure this is a common question...but I could not find the answer.
>
[quoted text clipped - 9 lines]
>
> Danny
danny.jurmann@brentpct.nhs.uk - 18 Mar 2007 23:09 GMT
On 15 Mar, 18:29, Ofer Cohen <OferCo...@discussions.microsoft.com>
wrote:
> Create a comboBox that Include all the fields that you want to display in the
> form.
[quoted text clipped - 44 lines]
>
> - Show quoted text -

You are a gem!  Thank you
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.