All of the sudden stopped working!!!

M

Matt P

This is my code and yes it is a lot, I have no idea why all of the
sudden it would stop working. Its been working for works and the
funny thing is even my backups aren't working either! I have tried it
on other computers as well loaded with Access 2007. Anyone have any
ideas why it would just stop working?

SELECT tblCompanies.[Company Name],
tblCompanyAddresses.State,
tblCompanyAddresses.City,
tblCompanies.Show,
tblCompanies.Independent,
tblAdjusters.Save,
tblCompanyAddresses.Address,
tblCompanyAddresses.ZipCode,
tblAdjusters.[Last Name],
tblAdjusters.[First Name]
FROM tblAdjusters INNER JOIN (tblCompanies INNER JOIN
tblCompanyAddresses ON tblCompanies.ID =
tblCompanyAddresses.CompanyID) ON tblAdjusters.AddressID =
tblCompanyAddresses.ID



WHERE (((tblCompanyAddresses.State)=IIf([FORMS]![frmMailingList]!
[chkMN],"MN","XX")) AND ((tblCompanies.Independent)=IIf([FORMS]!
[frmMailingList]![opgIndAdj]=2,No) Or (tblCompanies.Independent)=IIf
([FORMS]![frmMailingList]![opgIndAdj]=3,Yes,"XX"))) OR
(((tblCompanyAddresses.State)=IIf([FORMS]![frmMailingList]!
[chkMN],"MN","XX")) AND (([FORMS]![frmMailingList]![opgIndAdj])=1)) OR
(((tblCompanyAddresses.State)=IIf([FORMS]![frmMailingList]!
[chkWI],"WI","XX")) AND ((tblCompanies.Independent)=IIf([FORMS]!
[frmMailingList]![opgIndAdj]=2,No) Or (tblCompanies.Independent)=IIf
([FORMS]![frmMailingList]![opgIndAdj]=3,Yes,"XX"))) OR
(((tblCompanyAddresses.State)=IIf([FORMS]![frmMailingList]!
[chkWI],"WI","XX")) AND (([FORMS]![frmMailingList]![opgIndAdj])=1)) OR
(((tblCompanyAddresses.State)=IIf([FORMS]![frmMailingList]!
[chkIL],"IL","XX")) AND ((tblCompanies.Independent)=IIf([FORMS]!
[frmMailingList]![opgIndAdj]=2,No) Or (tblCompanies.Independent)=IIf
([FORMS]![frmMailingList]![opgIndAdj]=3,Yes,"XX"))) OR
(((tblCompanyAddresses.State)=IIf([FORMS]![frmMailingList]!
[chkIL],"IL","XX")) AND (([FORMS]![frmMailingList]![opgIndAdj])=1)) OR
(((tblCompanyAddresses.State) Like IIf([FORMS]![frmMailingList]!
[chkAll],"*")) AND ((tblCompanies.Independent)=IIf([FORMS]!
[frmMailingList]![opgIndAdj]=2,No) Or (tblCompanies.Independent)=IIf
([FORMS]![frmMailingList]![opgIndAdj]=3,Yes,"XX")));



It says that the expression is typed incorrectly or too complex and
its referring to the "((tblCompanies.Independent)=IIf([FORMS]!
[frmMailingList]![opgIndAdj]=2,No) Or (tblCompanies.Independent)=IIf
([FORMS]![frmMailingList]![opgIndAdj]=3,Yes,"XX")))" because when I
take out the second half it works fine... not sure why this would be,
especially since it was already working for weeks.


Any help would be greatly appreciated!!!

-Matt P
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top