M
Mark Kubicki
on a form <FixtureCataloges>,
i have 2 fields that uniquely identify the record: [Manufacturer] and
[CatalogNumber];
also on the form is a subform with 1 field: [Options], whose data source is
a table, FixtureCatalogsLuminiareTypes,
the table has 3 fields [Manufacturer] [CatalogNum] and [Option]
(-spelled differently... too many people woking on the same...);
and is related to the data source used for the main form with fields:
[Manufacturer] and [CatalogNum]
when a user goes to the subform, i'd like to check is a value 'accent light'
is present in the subform's data source
i've written the following code, but it's not working (i get error '2428'
invalid domain aggregate...)
any suggestions would be greatly appreciated
Private Sub Options_GotFocus()
varX = Null
Me.Options.Requery
varX = DLookup("[Option]", FixtureCatalogsLuminiareTypes, _
"[Option] = 'accent light' and [Manufacturer] = " &
Forms![FixtureCataloges].Manufacturer _
& " and [CatalogNum] = " & Forms![FixtureCataloges].CatalogNumber)
If IsNull(varX) Then
...
Else
...
End If
End Sub
thanks in advance,
Mark
i have 2 fields that uniquely identify the record: [Manufacturer] and
[CatalogNumber];
also on the form is a subform with 1 field: [Options], whose data source is
a table, FixtureCatalogsLuminiareTypes,
the table has 3 fields [Manufacturer] [CatalogNum] and [Option]
(-spelled differently... too many people woking on the same...);
and is related to the data source used for the main form with fields:
[Manufacturer] and [CatalogNum]
when a user goes to the subform, i'd like to check is a value 'accent light'
is present in the subform's data source
i've written the following code, but it's not working (i get error '2428'
invalid domain aggregate...)
any suggestions would be greatly appreciated
Private Sub Options_GotFocus()
varX = Null
Me.Options.Requery
varX = DLookup("[Option]", FixtureCatalogsLuminiareTypes, _
"[Option] = 'accent light' and [Manufacturer] = " &
Forms![FixtureCataloges].Manufacturer _
& " and [CatalogNum] = " & Forms![FixtureCataloges].CatalogNumber)
If IsNull(varX) Then
...
Else
...
End If
End Sub
thanks in advance,
Mark