Access Access Tick Box Calculation multiple records

Joined
Jan 7, 2013
Messages
1
Reaction score
0
Hi

I have 2 Tables based on Customers. Master Table Contains Contact info, And child Table has Address(s) Info. both of these have a relation, (master table) 1 to many(child table)

Each Customer can have multiple Addresses but only one primary address.
in the child table (addressTbl) I have these fields as follows:

PK=[AddressID] (autonumber)
fk=[CustID] (number int)
[address] (text)
[postcode] (text)
[city] (text)
[state] (text)
[country] (text)
[PrimeAddress] (tick box)

All is working sweet. I have made a form with Master table as master form and child table as sub form. I can add new customer and multiple addresses via this form for each customer.
I have also made a Query From Child (addressTbl) listing only 2 fields [custID] which is Grouped and [PrimeAddress] which is counted. see below.

CustID -- CountOfPrimeAddress
1 -- 2
1003
-- 3
1004
-- 1

Results here tell me that Customer 1 has 2 ticked address, customer 1004 has 1 ticked and 1003 has 3 addresses ticked as Primary Address (PrimeAddress).

What I want to do is set only 1 Primary address per customer regardless of how many address they may have. The Primary address will be used for invoices, mailing lists etc.. etc.. I want to send Mail to primary address and not to all address belonging to same customer.

How do I set only 1 ticked [PrimeAddress] for each [CustID] ?
Is there a easier way of going around this?

I hope iv explained clear enough as iv tried my best.

Thanks for Help :)
 
Last edited:

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