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 / Modules / DAO / VBA / July 2007

Tip: Looking for answers? Try searching our database.

Return The Value In A Specified Field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve - 18 Jul 2007 23:36 GMT
Field F in a table contains any one of the names of the fields in a table.
For example:
ID    F
3    MyFieldName

In record 3, MyFieldName has the value 13. Is there an expression that looks
at the name of the field in F and returns the value in that field? In this
example the expression would return 13.

For record 5, F might contain YourFieldName and YourFieldname in record 5
would have the value of 99. In this example the expression would return 99.

Thanks!

Steve
JohnC - 19 Jul 2007 00:04 GMT
Easiest but worse case because it is the slowest is to use dlookup

> Field F in a table contains any one of the names of the fields in a table.
> For example:
[quoted text clipped - 11 lines]
>
> Steve
Steve - 19 Jul 2007 00:57 GMT
John,

Thanks for responding! How do you suggest writing the DLookup expression.
Keep in mind that the expression has to leek at field F to get the fieldname
from where to get the value. In my first example, the expression has to look
in the field, MyFieldName, to get the value for record three. That same
expression has to look in the field, YourFieldName, to get the value for
record five.

Steve

> Easiest but worse case because it is the slowest is to use dlookup
>
[quoted text clipped - 17 lines]
>>
>> Steve
 
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.