Premium Only Content
			Conditional Display of Company or Person Name in Microsoft Access
Today's TechHelp tutorial from Access Learning Zone covers how to display either a person's name, a company name, or both conditionally in your Microsoft Access database.
Marcellino from Hefsabud, Georgia, one of our silver members, has asked a great question. In his table, he stores fields for company name, first name, and last name. Sometimes, he has all three, but other times he only has a company name or a person's name. He wants to ensure that when printing statements, the company name shows up if it's available, and if not, the person's name is printed instead.
There are a couple of ways to achieve this. First, I'll show you a basic method that involves adjusting some property settings on your reports. Then, I'll share a more advanced solution that doesn't require programming but will involve a few functions. The advanced method yields better results, but the beginner method is sufficient if you're looking for something quick and simple.
Before we dive in, make sure you've completed my Access Beginner Level One course. It's free and available on my website and YouTube channel. Also, familiarize yourself with the Can Grow and Shrink functionality, which allows fields without data to disappear on your reports.
Let's start with the beginner method. I'll use my TechHelp free template, which you can download from my website. This template includes a customer form with personal information, such as first name, last name, and address. I'll add a company name field to the customer table.
First, open the table in design view and add the company name field below the first and last name fields. Switch to datasheet view and enter some sample data. You should have a mix of records: some with both company and personal names, some with only company names, and some with only personal names.
Next, open a blank report template where I've set up basic settings like margins. Duplicate this template and name it something intuitive like "Customer Report." In the design view of this report, set the record source to the customer table. This ensures the report pulls data from the correct table.
Add the necessary fields from the customer table to the report: first name, last name, company name, and address. For aesthetic purposes, remove the default labels, arrange the fields in an address block format, and resize them as needed.
Save the report and preview it. Initially, you'll notice that some records will display blank fields, depending on the data. To make these fields disappear when they are empty, enable the Can Shrink property for the text boxes and the detail section of the report. This makes sure that if there's no data in a field, it won't display extraneous blank space.
After adjusting the properties, save and preview the report again. Empty fields should now be hidden, making the report look cleaner.
While this method is straightforward, you might be looking to add more professional touches, such as a conditional statement like "Statement prepared for" followed by either the company name or the person's name. For that, we can use a query and some functions, which I'll cover in a future video.
This concludes today's tutorial. If you want step-by-step instructions and a complete walkthrough, visit my website for a full video tutorial.
Live long and prosper, my friends.
For a complete video tutorial on this topic, please visit https://599cd.com/CompanyorPerson?key=Rumble
- 	
				
							38:16
								daniellesmithab
3 days agoAlberta Update: Getting Kids Back to the Classroom
28.4K11 - 	
				
							20:48
								BlaireWhite
5 days agoTrans TikTokers Are Crashing Out (Over Nothing)
32.6K12 - 	
				
							2:07:06
								Side Scrollers Podcast
22 hours agoHasan Piker CAUGHT LYING AGAIN + Twitch URGES LEFTIST IDEOLOGY + More | Side Scrollers
74.8K11 - 	
				
							8:40
								MattMorseTV
18 hours ago $14.34 earnedSchumer just KICKED OFF the Left-Wing CIVIL WAR.
35.8K36 - 	
				
							21:39
								Nikko Ortiz
2 days agoI Take A North Korean Shooting
33.5K6 - 	
				
							1:46:26
								The Michelle Moore Show
21 hours ago'The Religion Invasion In the U.S. and the Deep State Agenda' Guest, Mark Taylor: The Michelle Moore Show (Nov 3, 2025)
41.9K43 - 	
				
							LIVE
								TruthStream with Joe and Scott
5 days agoSovereign Codes & Cosmic Infrastructure,Ufo's, UAP's, Monads, Matrix Satellites, Interstellar Visitors, SYRONA #505
261 watching - 	
				
							LIVE
								Lofi Girl
2 years agoSynthwave Radio 🌌 - beats to chill/game to
144 watching - 	
				
							5:55:11
								MattMorseTV
14 hours ago $103.92 earned🔴Trump's '60 Minutes' INTERVIEW + MUCH MORE.🔴
165K54 - 	
				
							2:02:36
								Badlands Media
19 hours agoBaseless Conspiracies Ep. 157: Jack the Ripper, the Crash & the Great Disclosure Countdown
43.3K28