Pulling text from a table to a Textbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ferg96
    New Member
    • Jul 2007
    • 4

    Pulling text from a table to a Textbox

    I have a form with a textbox in it. I want the textbox to display the data stored in the column 'log' from the table 'disputes'. I am using the expression builder to add the control source. The expression is =disputes!log bu the result I get is '#Name?'.

    Can anyone provide some guidance on resolving this?

    Thanks
  • puppydogbuddy
    Recognized Expert Top Contributor
    • May 2007
    • 1923

    #2
    Originally posted by ferg96
    I have a form with a textbox in it. I want the textbox to display the data stored in the column 'log' from the table 'disputes'. I am using the expression builder to add the control source. The expression is =disputes!log bu the result I get is '#Name?'.

    Can anyone provide some guidance on resolving this?

    Thanks
    I assume that you've chosen not to bind the controls (including the textbox) to the form by using the table or a query as the control source for your form. If you did, then your textbox could be bound to the log field in the underlying table and you would not need an expression in the textbox..

    If using unbound forms/controls is your conscious choice, then one way you resolve your textbox expression is to use a DLookup as follows, assuming that you have some kind of link in your form to the dispute table:(maybe the user keys in a dispute # somewhere on the form???)
    = DLookup("[log]", "disputes", "dispute = '" & Me!Dispute & "'")

    Comment

    Working...