Hi, I am tring to display records on a form based on a query which limits records based on items in a combo box. The following code works great …
…Like [Forms]![Pricing]![frmTARTypeCut].[Form]![cboBurden_Center] & “*” …
But if the combo box displays a “1”, I get records that have a “1”, “10”, and “19”. So I tried to get the string length by using the following in the query Criteria…
… IIf([Forms]![Pricing]![frmTARTypeCut].[Form]![vBCLength]=”1″,(Like [Forms]![Pricing]![frmTARTypeCut].[Form]![cboBurden_Center],(Like [Forms]![Pricing]![frmTARTypeCut].[Form]![cboBurden_Center] & “*”) …
However, this ends up giving me no records at all. Also, when I go back and tryy to tweek the query criteria, I have noticed that Access has automatically changed the query criteria to …
… IIf([Forms]![Pricing]![frmTARTypeCut].[Form]![vBCLength]=”1″,([Pricing Detail TAR].[Burden_Center]) Like [Forms]![Pricing]![frmTARTypeCut].[Form]![cboBurden_Center],([Pricing Detail TAR].[Burden_Center]) Like [Forms]![Pricing]![frmTARTypeCut].[Form]![cboBurden_Center] & “*”).
Can any one shed some light on this for me?
Thanks
Kevin