Insert field from table

L

Leslie

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!
 
C

Carl Rapson

Leslie said:
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!

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

textfield = Nz(DLookUp("[field]","
","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
 
Top