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 / Queries / March 2006

Tip: Looking for answers? Try searching our database.

How to get the Value from a Table field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
newsneakers - 31 Mar 2006 04:37 GMT
I'm trying to call a "value" from a field in a table instead of the
underlying number -

Basically I have this:
A table called Projects with seven columns (ProjName, City, ProjEng,
ProjPhase) etc. In the table, I have assigned all the data types as "text",
except ProjEng - which I created as a number - because it's calling that data
(that populates the Projects.ProjEng field) from an Contacts table.
Everything worked just fine thus far.
Then I added a Projects Form which opens up from a link from Issues Table,
to edit the Projects Table from there.

When all of the fields in the Projects Form were text-only (text box),
everything was fine. However I changed the fields on the form to combo boxes
in order to
limit the selection to a list (to prevent typographical errors in the
Projects Table, hoping to prevent duplicate records because of typos.
Again, all of the drop down lists (on the Projects Form) work fine (pulling
the data from the Projects Table to the combo drop down list- and at the
same time  - updating the selection back to the Projects Table according to
the selection.
However, since the ProjEng column is a number-type in the Projects Table it
is showing as a number in the drop down list - instead of the names.

I've tried but can't seem to find a way to get it to select the Value of the
data in the field instead of the actual number.
Any solutions to this would be greatly appreciated.
RWhittet - 31 Mar 2006 05:05 GMT
In form view, select the properties for your combo box.  The row source type
should be table/query, and in the space for row source, click the ... to the
right of the space.  In the query builder, you'll want to show both of your
tables, and from the Projects table select ProjEng as column #1.  From your
Contacts table, select the field that contains the names you want to see in
your combo box as column #2.  After saving, go back to properties in form
view.  The row source box should now be the name of your new query. Select
"2" for column count and "1" for bound column.  Adjust the column widths so
that column 2 is visible.  This should get you what you want.  Hope it helps,

Rick

> I'm trying to call a "value" from a field in a table instead of the
> underlying number -
[quoted text clipped - 23 lines]
> data in the field instead of the actual number.
> Any solutions to this would be greatly appreciated.
 
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.