Yes/No

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Ciao everybody
I have a table (TBLCONTACT) with the following structure:

IDContact Client Product Date Time Comment YES/NO
Counter Number Text date time text yes/no

It happens that a client sometimes does not want anymore a product, so I use
the yse/no field to remeber this fact.

Now the problem is that I have several contacts for the same client and the
same product. I would like to flag only once the product so that it
automatically flags all the other contacts for this client referring to this
product.

I used to do this by hand, but now I have more that 20 contacts for the same
client and the same product, and it is starting to become painful and, more
important, not error free.

Thanks in advance, Sylvia
 
You need to rethink your design.
Your table is not normalized.
The yes/no should be related to client and product not to contact.
What if one contact says they want a product and another (for the same
client)says they don't?

Dorian
 
Ciao everybody
I have a table (TBLCONTACT) with the following structure:

IDContact Client Product Date Time Comment YES/NO
Counter Number Text date time text yes/no

It happens that a client sometimes does not want anymore a product, so I use
the yse/no field to remeber this fact.

Now the problem is that I have several contacts for the same client and the
same product. I would like to flag only once the product so that it
automatically flags all the other contacts for this client referring to this
product.

I used to do this by hand, but now I have more that 20 contacts for the same
client and the same product, and it is starting to become painful and, more
important, not error free.

Thanks in advance, Sylvia

What has this to do with Access queries?

Which is the Prime Key field that identifies the client? Is it
[IDContact] or [Client]?
I'll assume [IDContact].

Back up your table first.

On the form that you use for data entry:
Code the AfterUpdate event of the Yes/No field:
CurrentDb.Execute "Update TableName Set TableName.[YesNoField]= " &
Me![YesNoField] & " Where TableName.[IDContact] = " & Me![IDContact],
dbFailOnError

Change [IDContact] to whatever the actual field name is that is the
unique prime key field for the client.
 
Sylvia

From your description, the Yes/No belongs to unique combinations of Client &
Product, rather than, as you now have, each contact.

One way to do this would be to keep a ClientXProduct table, with a "Don't
Call" yes/no field. That way, you'd only need to check one place per valid
client X Product combination.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top