Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
Change control source
Gary 

17 years ago
Thanks for the help, Everything worked fine except for one thing.

I setup an option group with 3 selections arriving departing or assigned. My text box control source updates accordingly to the selection I made.    

The problem that comes into play is, say record 1 was selected to arriving and record 2 was departing.

If I return to record 1 from record 2 the option group displays arriving however the control group remains on departing.

Its as if the update is not running when a different record is selected.

Since my code is a little more complicated than my example above I will post it below to make sure i have not made any other mistakes.

Private Sub Status0_AfterUpdate()
If Status0 = 1 Then
   StatusTB1.ControlSource = "InboundFrom"
   StatusTB2.ControlSource = "ArrivalDate"
   StatusTB3.ControlSource = "InboundSponsor"
   StatusTB2.Visible = True
   StatusTB3.Visible = True
ElseIf Status0 = 2 Then
   StatusTB1.ControlSource = "Outboundto"
   StatusTB2.ControlSource = "DepartureDate"
   StatusTB3.ControlSource = "OutboundSponsor"
   StatusTB2.Visible = True
   StatusTB3.Visible = True
Else
   StatusTB1.ControlSource = "Daterpt"
   StatusTB2.Visible = False
   StatusTB3.Visible = False
End If
DoCmd.RunCommand acCmdRefresh
End Sub

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
 
What's This?

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 10/16/2026 11:00:30 AM. PLT: 1s