I'm trying to write an sql statement that switches on a forms combo box text. Here is what I have right now.
Since the styles have to be in different fields I'm trying to get the checked records based on whatever the combo box has selected.
The point where I'm running into troubles is here: ([Forms]![frmLMBSearch]![cmbStyle].[Value])=True, This just won't work and I'm sure there is an easy way to do it I just can't think of it right now.
Any help would be welcomed.
-Dave
Code:
SELECT tblLMB.Title, tblLMB.March, tblLMB.Overture, tblLMB.Patriotic
FROM tblLMB
WHERE (((IIf([Forms]![frmLMBSearch]![cmbStyle].[enabled]=True,([Forms]![frmLMBSearch]![cmbStyle].[Value])=True))<>False));
The point where I'm running into troubles is here: ([Forms]![frmLMBSearch]![cmbStyle].[Value])=True, This just won't work and I'm sure there is an easy way to do it I just can't think of it right now.
Any help would be welcomed.
-Dave