qryAppend IIF/Then Statement.

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

Hi;

Our mdb database has, among others, tblQuote & tblPurchased.

tblPurchased includes fields for City and Township.
tblQuote only has a City field and a checkmark control if the company qouted
is in a township.

What I need to learn is how to manipulate the qryAppendQuoteToPurchased.

Don't have the Vaguest idea, well maybe a little but they haven't worked,
how to do this.

When the qryAppend is run, if the chrmarkTownshipYN = True.
The "City" name must be copied into txtPurTwnShip.
if the chrmarkTownshipYN = False
The "City" name must be copied into txtPurCity.

Would someone be so kind and point me in the right direction?

Andy
 
As your app, like all apps, are completely custom, there's no way to tell
what, or why, your app is doing what it does.

You can post the SQL to qryAppendQuoteToPurchased, and list the table
structures of the tables involved, and we could still NOT know what the
problem is, if any.

So, you need to work with the app a little more and get a sense of what it's
doing, and the business rules of WHY it is doing it. When all else fails,
ask the users of the current app, as one of them may have been around when
the app was created.

--
Steve Clark, Access MVP
FMS, Inc.
Call us for all of your Access Development Needs!
1-888-220-6234
(e-mail address removed)
www.fmsinc.com/consulting
 
Kind of hard to say since you didn't give us enough information to give a
complete solution. It is always a good idea to post the SQL of the query
involved (even if it is not quite correct).

How do you link tblQuote to tblPurchased?
Is txtPurTwnShip a field in tblPurchased?
Is txtPurCity a field in tblPurchased?

Basically, if you can use an iff statement in two calculated columns which would
like up with the two fields you are trying to fill - something like;
IIF(chrMarkTownShipYN,Null,tblQuote.CityNameField)
IIF(chrMarkTownShipYN,TblQuote.CityNameField,Null)

TEST ON A COPY.
 
Back
Top