I’d like to populate a label or text box or form caption with the date value from it’s table. How can this be done?
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Pull date from table for form (Access 2003)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Pull date from table for form (Access 2003)
- This topic has 3 replies, 2 voices, and was last updated 16 years, 4 months ago.
AuthorTopicWSjazman2k
AskWoody LoungerJanuary 9, 2009 at 7:09 pm #456545Viewing 0 reply threadsAuthorReplies-
WSHansV
AskWoody LoungerJanuary 9, 2009 at 7:17 pm #1141224I assume that the date field is part of the record source of the form.
The easiest way is to place a text box on the form and set its Control Source property to the name of the field (you can select the field name from the dropdown list). (If you wish, you can set the Locked property of the text box to Yes and the Enabled property to No so that the user can’t edit the date.)
If you prefer a label: place a label on the form and name it lblDate.
Create an event procedure for the On Current event of the form:Private Sub Form_Current()
Me.lblDate.Caption = Me.DateField
End Subwhere DateField is the name of the date field.
If you want to set the caption of the form itself:
Private Sub Form_Current()
Me.Caption = Me.DateField
End Sub -
WSjazman2k
AskWoody Lounger -
WSHansV
AskWoody LoungerJanuary 9, 2009 at 9:24 pm #1141247You could use the On Load or On Open event of the form, for example:
Private Sub Form_Load()
Me.Caption = CurrentData.AllTables(Me.RecordSource).DateCreated
End Subor if you want to specify a format:
Private Sub Form_Load()
Me.Caption = Format(CurrentData.AllTables(Me.RecordSource).DateCreated, “Short Date”)
End Sub
-
-
Viewing 0 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
-
Upgrading from Win 10
by
WSjcgc50
28 minutes ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
6 hours, 1 minute ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
7 hours, 17 minutes ago -
The story of Windows Longhorn
by
Cybertooth
7 hours, 47 minutes ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
9 hours, 16 minutes ago -
Are manuals extinct?
by
Susan Bradley
2 hours, 39 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
18 hours, 24 minutes ago -
Network Issue
by
Casey H
5 hours, 29 minutes ago -
Fedora Linux is now an official WSL distro
by
Alex5723
1 day, 6 hours ago -
May 2025 Office non-Security updates
by
PKCano
1 day, 6 hours ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
1 day, 8 hours ago -
pages print on restart (Win 11 23H2)
by
cyraxote
9 hours, 37 minutes ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
1 day, 10 hours ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
1 day, 10 hours ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
1 day, 18 hours ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
10 hours, 42 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
2 days, 5 hours ago -
How much I spent on the Mac mini
by
Will Fastie
1 day, 5 hours ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
8 hours, 43 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
2 days, 11 hours ago -
Setting up Windows 11
by
Susan Bradley
1 day, 6 hours ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
2 days, 7 hours ago -
Powershell version?
by
CWBillow
2 days, 7 hours ago -
SendTom Toys
by
CWBillow
18 hours, 44 minutes ago -
Add shortcut to taskbar?
by
CWBillow
2 days, 11 hours ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
3 days, 4 hours ago -
How can I install Skype on Windows 7?
by
Help
3 days, 2 hours ago -
Logitech MK850 Keyboard issues
by
Rush2112
2 days, 9 hours ago -
We live in a simulation
by
Alex5723
3 days, 18 hours ago -
Netplwiz not working
by
RetiredGeek
3 days, 4 hours ago
Recent blog posts
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.