Re: Marking addresses as preferred

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Matthew, an alternate approach might be to use a Priority field (Number) instead of the Preferred field (Yes/no.)

That way, the user can specify the not only the #1 address for the client, but other preferred addresses as well. If they have 2 that are both #1, your software assumes that either one is of equal priority, and so the user will be happy with either address returned.

This is very simple to implement, more flexible and informative, and moves responsiblity for sorting out the data from the developer to the user.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Matthew" <mappleNOSPAMPLEASE@xxxxxxxx> wrote in message
news:eqo7RHcTIHA.6060@xxxxxxxxxxxxxxxxxxxxxxx
Hello,

Here's my structure:

tblClients
*ClientID
...

tblAddresses
*AddressID
...

tblClientAddresses
*ClientAddressID
ClientID
AddressID
Preferred (y/n)

I want to make sure that every client has no more than one preferred address. I've identified those with more than one preferred, and it's a small enough number that I can clean that up manually.

But what about clients who have one or more addresses, but none are marked as preferred? How can I make sure that each unique client in tblClientAddresses has at least one (and preferably only one) of their addresses marked as Preferred?

Many thanks in advance!!

Matthew


.



Relevant Pages

  • Re: Getting the Groups a User belongs to ( in a service)
    ... > TokenGroups property led me in the right direction. ... > token of the client user. ... If you specify a username and password, ... This is by far the fastest way to get all of the relevant SIDs. ...
    (microsoft.public.dotnet.security)
  • Re: Merge Replication Problems after upgrade to SQL Express
    ... I found out that I need to specify QueryTimeout as DWORD ... specify 120 there for QueryTimeout synchronization work again and Profiler ... I applied the hotfix on the server and client now, ... The merge process could not clean up the subscription to ...
    (microsoft.public.sqlserver.replication)
  • Re: Saving client addresses
    ... when you create tblClientAddresses, you'll need to remove the address fields ... indicate which, of several addresses for a single client, is the *current* ... that's a simple solution at the table/query level, ... > We need to save the addresses of our clients when we send out letters ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Secifying RPC ip address of client
    ... >> the client side in terms of an RPC call? ... Server side", I don't agree that this is the same situation. ... If it has to specify remote addresses, ... it is important to have control over the source address being ...
    (microsoft.public.win32.programmer.networks)
  • Re: Software file collection problems - which log
    ... the number of lines you see where you specify "Collect ... This posting is provided "AS IS" with no warranties, and confers no rights. ... > when I go into the Software Inventory Client agent properties and click on ... > I will check the logs later. ...
    (microsoft.public.sms.admin)