pinstripe
Programmer
- Dec 27, 2004
- 52
hi,
i have a list box in which i have data from table A , i am adding this data to table B (two tables are not in the relationship) - i would like to mark (with red) all data which are already in the table B when the form starts
code so far:
If IsNull(DLookup("[Stock Code]", "[BOM L1]", ("[Stock Code]= '" & [Forms]![BOM L1]![List100].Column(7) & "' And [Q-Level]= '" & [Forms]![BOM L1]![List100].Column(8) & "'"))) Then
[Forms]![BOM L1]![List100] = vbRed
Else
[Forms]![BOM L1]![List100] = vbBlack
End If
but this is done just for hole list...
where is better to put the code : on formLoad or on BeforeUpdate of listbox
i have try the line: Me.[List100.RowSource.Forecolor= vbRed
but it is not working
thx for help
i have a list box in which i have data from table A , i am adding this data to table B (two tables are not in the relationship) - i would like to mark (with red) all data which are already in the table B when the form starts
code so far:
If IsNull(DLookup("[Stock Code]", "[BOM L1]", ("[Stock Code]= '" & [Forms]![BOM L1]![List100].Column(7) & "' And [Q-Level]= '" & [Forms]![BOM L1]![List100].Column(8) & "'"))) Then
[Forms]![BOM L1]![List100] = vbRed
Else
[Forms]![BOM L1]![List100] = vbBlack
End If
but this is done just for hole list...
where is better to put the code : on formLoad or on BeforeUpdate of listbox
i have try the line: Me.[List100.RowSource.Forecolor= vbRed
but it is not working
thx for help