Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Oct 2001
    San Bernardino, California, USA
    Thanked 0 Times in 0 Posts

    Report title using a field value from a table (Xp, 2000)

    I have a report that has a header containing a label "Summary report for " and then an unbound text box where I want to diaplay the contents of a value in a field from a table. The table is Client and the field is Client. There is only one record in the Client table. I have tried the following as an "on open" event for the report:
    Text13 = table[Client]![Client] ; this did not work then tried inserting an equal sign before those expressions, that didn't help either.

    Text13 = [Client]![Client] ; this did not work

    Text13 = [Client.Client] ; this did not work

    So, then I tried changing the control source of the text box (text13) to client.client; this did not work
    then tried using [client]![client] and that did not work.

    What am I doing wrong. When I change the control source, I am prompted for the client but regardless of what I enter, it doesn't work. When I change the on open event, I always get unable to find field errors.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Report title using a field value from a table (Xp, 2000)

    Use the DLookup function:


    The general form is DLookup("Fieldname", "Table_or_Queryname", "Where-condition"). The third argument (the where-condition) may be omitted if not needed, as is the case here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts