Value from a table show on rpt

  • Thread starter Thread starter SoggyCashew
  • Start date Start date
S

SoggyCashew

Hello I have a report that is unbound and Im using something like:
=Forms!AccidentEntry!AccidentEntrySubform.Form!ID
in each control source. Anyway I have a text boxes that have to have a name
from a table named tblPlantInfo. The field in this table is named PM. How can
I write a function to retrieve what is tin the tables field named PM so I can
put int in the control source on my report. Thanks!
 
Hello I have a report that is unbound and Im using something like:
=Forms!AccidentEntry!AccidentEntrySubform.Form!ID
in each control source. Anyway I have a text boxes that have to have a name
from a table named tblPlantInfo. The field in this table is named PM. How can
I write a function to retrieve what is tin the tables field named PM so I can
put int in the control source on my report. Thanks!

Just guessing here...

=DLookUp("PM", "[tblPlantInfo]", "[ID] = " &
Forms!AccidentEntry!AccidentEntrySubform.Form!ID)
 
Thanks for the reply John! I got it with =DLookUp("
","tblPlantInfo")
--
Thanks,
Chad


John W. Vinson said:
Hello I have a report that is unbound and Im using something like:
=Forms!AccidentEntry!AccidentEntrySubform.Form!ID
in each control source. Anyway I have a text boxes that have to have a name
from a table named tblPlantInfo. The field in this table is named PM. How can
I write a function to retrieve what is tin the tables field named PM so I can
put int in the control source on my report. Thanks!

Just guessing here...

=DLookUp("PM", "[tblPlantInfo]", "[ID] = " &
Forms!AccidentEntry!AccidentEntrySubform.Form!ID)
 
Thanks for the reply John! I got it with =DLookUp("
","tblPlantInfo")



This will find the first (actually an arbitrary) record from tblPlantInfo
unless you add a criterion as a third argument. If that's what you want,
fine...
 
Back
Top