Forum Discussion
ns61
Mar 07, 2025Copper Contributor
Primary Phone Number
Newish to 'developing' in Access...previous experience w/Access has been importing raw data, using SQL and Macros to process data to put into format to import into SQL db. I'm racking my brain on how to resolve to have only one phone number out of multiple to be the 'primary' phone number (NOT the primary key as most searches take me to.
I have 3 tables...CustomerT, PhoneT, and PhoneTypeT - each have their own ID's (CustID, PhoneID, PhoneTypeID). Phone Types could be Cell, Home, Office, Fax, Spouse....and so on. Each customer can have multiple phone numbers...I want one of them to be the 'primary' number (because I'll need to pull in the primary number into another form at some point - same thing can be done with email as well).
I've added a Y/N checkbox - when checked, indicates primary...but I can't wrap my head around to allow only one checkbox to be checked (in other words, checkbox for 'Cell' is checked...then later, 'Home' is checked - I'd want to 1) msg user asking if they want to mark 'Home' as the "Primary" number - if yes, then 2) mark 'Home' as primary (checkbox is true) and then make sure all other checkboxes are unchecked (false).
I know SQL and somewhat familiar with VBA...just am pretty rusty with both so syntax would be helpful. Thanks!!
- ns61Copper Contributor
Please disregard this post - see my other post at https://techcommunity.microsoft.com/discussions/access/trouble-identifying-primary-phone-number/4390704
- arnel_gpSteel Contributor
You already have a post with same topic. Please stick to your original thread. Also there are answers there.
- ns61Copper Contributor
Yes, sorry. This post was actually my original post but I couldn't find it so I created the other post...turns out this post was still pending and so it hadn't been published yet. Thanks for your comments on my other post.