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 / October 2005

Tip: Looking for answers? Try searching our database.

Read Table Data Into Form Fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
stillcrazee - 14 Oct 2005 22:29 GMT
I have a table with 4 columns.  (1) Material Number, (2) Material, (3) Unit
of Measure, (4) Standard Cost.  There are about 30 rows of data filled in.  

I want to be able to enter a (1) material number and have the (2) material,
(3) unit of measure and (4) standard cost fill in on my form.  

I will add invoice cost and favorability/unfavorability fields in the form,
but I am wondering how is the best way to do this.  Thank you.
Allen Browne - 15 Oct 2005 04:43 GMT
Presumably you have another table that contains the Material Number,
Material, Unit of Measure, and Standard Cost, and you you are now creating a
form where these values need to get entered into something like an order?

If so, you could use a combo box for Material Number, and set its RowSource
to the lookup table that contains all the values. I'm not sure the order
table should contain the Material column: would it be a problem if the
Material Number did not match the name in the Material column? If so, you
should not store this value in the order table as well. I'm guessing that
the other columns could be needed, e.g. if the material is normally measured
in litres, but you need to be able to fill out an order in grams.

If that's the idea, you could use the AfterUpdate event procedure of the
combo to assign the values from the secondary fields of the combo to the
other fields in the form. The code would look something like this:
Private Sub Material_Number_AfterUpdate()
   With Me.[Material Number]
       Me.[Unit of Measure] = .Column(2)
       Me.[Standard Cost] = .Column(3)
   End With
End Sub

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>I have a table with 4 columns.  (1) Material Number, (2) Material, (3) Unit
> of Measure, (4) Standard Cost.  There are about 30 rows of data filled in.
[quoted text clipped - 6 lines]
> form,
> but I am wondering how is the best way to do this.  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.