Results 1 to 2 of 2
2004-03-31, 22:01 #1
- 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.
2004-03-31, 22:09 #2
- Join Date
- Mar 2002
- Thanked 29 Times in 29 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.