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 / May 2007

Tip: Looking for answers? Try searching our database.

Insert field from table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Leslie - 18 May 2007 15:27 GMT
I am trying to insert a field from a table, however I do not have that table
as the source for the form. This is from a separate table that I just want to
add to this existing form.

Since I only want one field from the table, I do not want to add a subform
that shows the whole table.

Any suggestions? Thanks!
Carl Rapson - 18 May 2007 16:24 GMT
>I am trying to insert a field from a table, however I do not have that
>table
[quoted text clipped - 6 lines]
>
> Any suggestions? Thanks!

Add an unbound textbox control to the form and populate it with DLookUp in
the Form_Current event:

   textfield = Nz(DLookUp("[field]","[table]","criteria"),"")

Nz is needed in case the field is empty; you can't assign a Null value to a
textbox control. Be sure to use your own control, field, and table names.

Carl Rapson
 
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



©2009 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.