Hello all: Using VBA to format a report in Access97. Putting the results of the formatting into 2 variables named str1 and str2 . How are these variables then printed on the report. I have tried textboxes and named the control source(s) =str1 and =str2. When I run the report, inputboxes ask for str1 and str2. How can I get by this dilemma? TIA.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Printing
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Printing
- This topic has 4 replies, 4 voices, and was last updated 24 years ago.
AuthorTopicWSBCKessinger
AskWoody LoungerMarch 7, 2001 at 6:35 pm #353630Viewing 3 reply threadsAuthorReplies-
WSDeborah
AskWoody LoungerMarch 7, 2001 at 7:39 pm #517766 -
WScharlotte
AskWoody LoungerMarch 8, 2001 at 3:55 am #517840You can’t use variables in the control source of reports or forms because variables are only usable in code. What you can do is either as Deborah suggests, or you can populate the textbox from code based on the value of the variable. In other words, in some event procedure you set Me.Textbox1=str1, substituting the actual name of your control for Textbox1.
-
WSBart
AskWoody LoungerMarch 8, 2001 at 6:56 am #517856Just define a public function in any module you want.
It should look like this:Public Function fnFillTest() As String
fnFillTest = “Nice output!”
End FunctionCall the function in the Control Source property of the control you want the value to be displayed:
=fnFillTest()That will do the job for you.
-
WSBCKessinger
AskWoody Lounger
Viewing 3 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Error updating to Win11 0x8024a205
by
bmeacham
3 minutes ago -
default apps
by
chasfinn
7 hours, 14 minutes ago -
Will MS Works 4 work in MS Win 11?
by
MileHighFlyer
5 hours, 35 minutes ago -
Adding links to text in Word 2000
by
sgeneris
16 hours, 43 minutes ago -
FBI warnings are true—fake file converters do push malware
by
Nibbled To Death By Ducks
9 hours, 55 minutes ago -
Classic and Extended Control Panel — no need to say goodbye
by
Deanna McElveen
2 hours, 46 minutes ago -
Things you can do in 2025 that you couldn’t do in 2024
by
Max Stul Oppenheimer
10 hours, 21 minutes ago -
Revisiting Windows 11’s File Explorer
by
Will Fastie
5 minutes ago -
Planning ahead for migration
by
Susan Bradley
5 minutes ago -
Yahoo mail getting ornery
by
Tom in Az
3 hours, 5 minutes ago -
Is Spectrum discontinuing email service?
by
Peobody
1 hour, 20 minutes ago -
Practice what you preach! A cautionary tale.
by
RetiredGeek
2 hours, 19 minutes ago -
Looking for Microsoft Defender Manuals/Tutorial
by
blueboy714
2 hours, 4 minutes ago -
Win 11 24H2 Home or Pro?
by
CWBillow
1 day, 10 hours ago -
Bipartisan Effort to Sunset the ‘26 Words That Created the Internet’..
by
Alex5723
2 days, 8 hours ago -
Outlook new and edge do not load
by
cHJARLES a pECKHAM
2 days, 20 hours ago -
Problem using exfat drives for backup
by
Danmc
2 days, 20 hours ago -
I hate that AI is on every computer we have!
by
1bumthumb
1 day, 22 hours ago -
Change Info in the Settings window
by
CWBillow
3 days, 3 hours ago -
Attestation readiness verifier for TPM reliability
by
Alex5723
3 days, 9 hours ago -
Windows Update says that “some settings are managed b your organization”
by
Ed Willers
2 days, 19 hours ago -
Use of Gmail rejected.
by
CBFPD-Chief115
2 days, 20 hours ago -
WuMgr operational questions
by
Tex265
19 hours, 54 minutes ago -
Beijing’s unprecedented half-marathon: Humans vs. humanoids!
by
Alex5723
4 days, 1 hour ago -
New Phishing Campaign Targeted at Mac Users
by
Alex5723
3 days, 1 hour ago -
Backing up Google Calendar
by
CWBillow
4 days, 7 hours ago -
Windows 11 Insider Preview build 27818 released to Canary
by
joep517
4 days, 20 hours ago -
File Naming Conventions (including Folders)
by
Magic66
3 days, 18 hours ago -
Windows 11 Insider Preview Build 26100.3613 (24H2) released to Release Preview
by
joep517
5 days, 3 hours ago -
Microsoft sends emails to Windows 10 users about EOS
by
Alex5723
4 days, 14 hours ago
Recent blog posts
- Classic and Extended Control Panel — no need to say goodbye
- Things you can do in 2025 that you couldn’t do in 2024
- Revisiting Windows 11’s File Explorer
- Planning ahead for migration
- Woody Leonhard (1951–2025)
- What I learned from Woody Leonhard
- Windows Settings today
- Mail Merge magic in Microsoft Word
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.