I
Isis
I am having problems with my syntax I think.
I have a combo box on a form called 'ListType' - It can be set to one of
three values (values present in the [TYPE] field of the 'Colours' Table;
'Standard'
'Brown'
'Green'
I am using DLookup to get the right value from a Table based on the value
set in the 'ListType' Control like this;
strColour = DLookup([strFieldName], "Colours", "[Type] = Me.ListType")
This is failing on the "[TYPE] =" part of the DLookup - The [TYPE] field
in the Colours Table is a Text field but if I change it to a Numeric
field and substitute [TYPE] = 1 then the DLookup works as I expect so I
think my syntax is out somehow when the field is a Text field.
What should my DLookup function read given that [TYPE] in the 'Colours'
file is a Text Field ! I think I am using or not using ("") or ('')
wrongly in the "[Type] = Me.ListType" section.
I hope this makes some sense.
Any info appreciated
Regards
I have a combo box on a form called 'ListType' - It can be set to one of
three values (values present in the [TYPE] field of the 'Colours' Table;
'Standard'
'Brown'
'Green'
I am using DLookup to get the right value from a Table based on the value
set in the 'ListType' Control like this;
strColour = DLookup([strFieldName], "Colours", "[Type] = Me.ListType")
This is failing on the "[TYPE] =" part of the DLookup - The [TYPE] field
in the Colours Table is a Text field but if I change it to a Numeric
field and substitute [TYPE] = 1 then the DLookup works as I expect so I
think my syntax is out somehow when the field is a Text field.
What should my DLookup function read given that [TYPE] in the 'Colours'
file is a Text Field ! I think I am using or not using ("") or ('')
wrongly in the "[Type] = Me.ListType" section.
I hope this makes some sense.
Any info appreciated
Regards