G
Guest
Here's one to get your heads around on a Friday!
In my database I have the following:
A table called tblCareNotes, which contains 2 fields: PartNumber, CareNote.
Partnumber is unique and will only appear in this table once.
A table called tblInspectionRecords with many fields, one of which is
PartNumber, and will be the same as the part number in the above table.
I have created a report (called rptInspectionRecords) that that uses a query
to retrieve all instances of a part number and list them. What I want to do
is add the CareNote field from the CareNotes table to the header of the
report as the contents of this field will apply to all records.
I have used an unbound textbox in the header and set its control source to:
DLookUp("[CareNote]","[tblCareNotes]","([PartNumber])=REPORTS![rptInspectionRecords]![PartNumber]")
But I get the following error message,
Syntax Error (Missing operator) in query expression
it also displays my Dlookup line, but it's slightyly different:
First([DLookUp("[CareNote]","[tblCareNotes]","([PartNumber])=REPORTS]![rptInspectionRecords]![[PartNumber]")])'
As you can see it's inserted some extra [ ] in places, I suspect I've made a
stupid mistake somewhere but I can't see it
Anyone got any ideas?
Thanks
Neil
In my database I have the following:
A table called tblCareNotes, which contains 2 fields: PartNumber, CareNote.
Partnumber is unique and will only appear in this table once.
A table called tblInspectionRecords with many fields, one of which is
PartNumber, and will be the same as the part number in the above table.
I have created a report (called rptInspectionRecords) that that uses a query
to retrieve all instances of a part number and list them. What I want to do
is add the CareNote field from the CareNotes table to the header of the
report as the contents of this field will apply to all records.
I have used an unbound textbox in the header and set its control source to:
DLookUp("[CareNote]","[tblCareNotes]","([PartNumber])=REPORTS![rptInspectionRecords]![PartNumber]")
But I get the following error message,
Syntax Error (Missing operator) in query expression
it also displays my Dlookup line, but it's slightyly different:
First([DLookUp("[CareNote]","[tblCareNotes]","([PartNumber])=REPORTS]![rptInspectionRecords]![[PartNumber]")])'
As you can see it's inserted some extra [ ] in places, I suspect I've made a
stupid mistake somewhere but I can't see it
Anyone got any ideas?
Thanks
Neil