Need help with an append query

smichaels1234

Registered User.
Local time
Today, 18:41
Joined
May 12, 2008
Messages
64
I have a field called Warranty. The criteria specifies this:

IIf([Forms]![frm_FieldServiceLog].[cboWarranty]=Yes,"Y",IIf([Forms]![frm_FieldServiceLog].[cboWarranty]=No,"N"))

What I am trying to do here is I have a combo box that I am specifying Yes or a No value. Within the database field (Warranty) it's specified as Y and N. I can get the code to bring up the only Yes but and never No. What am I doing wrong?
 
Change it to:

IIf([Forms]![frm_FieldServiceLog].[cboWarranty]=Yes,"Y","N"))
 
Change it to:

IIf([Forms]![frm_FieldServiceLog].[cboWarranty]=Yes,"Y","N"))

Or you might have to go with:

IIf([Forms]![frm_FieldServiceLog].[cboWarranty]="Yes","Y","N"))
 
Neither one of them worked. I must be doing something wrong with my query. Basically I am running it through a macro. I hit the OK button and it appends to a table that I created locally. The macro also clears the table on every new search criteria. Not sure what's happening.
 
Thanks for your help. You know what I needed to do? I needed to write 2 append queries of which one was getting the No values and the other was getting the Yes values then your query worked for my select statement. Thanks again.
 

Users who are viewing this thread

Back
Top Bottom