G
Guest
I'm trying to use Dlookup to prevent a new record from a form being saved to
a table if it is already in the table. My problem is this - the records
contain a name and an award. The award is created by concatenating 2
textboxes with a blank space in between. In the "criteria" part of the
Dlookup statement, I'm trying to check the table for the name and the
concatenated award, but Access doesn't like my concatenated award. I get a
"Expected list separator or)" error. Here is the offending statement:
x = DLookup("[txtFullName]", "[tblAwards]", "([tblAwards].[txtAward] =
(Forms!frmAwards3.txtAward & " " & Forms!frmAwards3.txtAward2)) And
([tblAwards].[txtFullName] = Forms!frmAwards3.txtStuName)")
The error is right where I stick in the blank space - " ". Is there any way
around this or do I just not understand Dlookup?
Nick
a table if it is already in the table. My problem is this - the records
contain a name and an award. The award is created by concatenating 2
textboxes with a blank space in between. In the "criteria" part of the
Dlookup statement, I'm trying to check the table for the name and the
concatenated award, but Access doesn't like my concatenated award. I get a
"Expected list separator or)" error. Here is the offending statement:
x = DLookup("[txtFullName]", "[tblAwards]", "([tblAwards].[txtAward] =
(Forms!frmAwards3.txtAward & " " & Forms!frmAwards3.txtAward2)) And
([tblAwards].[txtFullName] = Forms!frmAwards3.txtStuName)")
The error is right where I stick in the blank space - " ". Is there any way
around this or do I just not understand Dlookup?
Nick