Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Getting a Value From a Sub Form on Another Sub For
Dave Clark 
           
16 months ago
I have created a vertical multi-tab sub form similar to what is described in the the ABCD where each tab opens a new sub form. I need a field value from the 1st tabbed sub form on the 4th sub form. I haven't been able get the value on the forth form.

1st tabbed sub form name: ControlCopyF, 4th tabbed sub form VaultF
ProjectSubF.SourceObject is the link to each form on the OnClick event. the field I need mirror is ControlCopyID.  Control Copy ID is a Number.
Adam Schwanz  @Reply  
           
16 months ago
Create an invisible textbox on the main form, retrieve the value from subform1 and store it in there, then use it in subform 4.
Adam Schwanz  @Reply  
           
16 months ago
Also to confirm, when you say tabbed, do you mean a tab control, as in all the subforms are always loaded on the form? Then there's other ways to do this. Or do you mean like in the ABCD where there is only one subform, and we're changing the source object of that one subform?
Dave Clark OP  @Reply  
           
16 months ago
Adam thanks for responding so quickly. Yes to one source object that opens mutiple forms One form open at a time.
Dave Clark OP  @Reply  
           
16 months ago
Hey Adam,
What I came up with is: On Load: DoCmd.OpenForm "SubForm1F", acNormal, , , , acHidden
                                                
                                                Me.ControlCopyID = Forms!Subform1F!ControlCopyID

Not sure if this is the best way but it works.
Dave Clark OP  @Reply  
           
16 months ago
Well I thought it worked! It doesn't get the current record.
Adam Schwanz  @Reply  
           
16 months ago
You could push the subform1 button in the on current event, loading that subform, then grabbing the value at that point, then you could "unload" the subform if you wanted to.
Adam Schwanz  @Reply  
           
16 months ago
You know, this might be overcomplicating a DLOOKUP. Can we just use a dlookup?
Adam Schwanz  @Reply  
           
16 months ago
If not,  you're looking at some kinda shenanigans like this, which doesn't seem to work on a field that is in a continuous form.
    EmailTab_Click
    MyEmail = Forms!EntityF!EntitySubF.Form!MyField
    EntitySubF.SourceObject = ""
Dave Clark OP  @Reply  
           
16 months ago
Any ideas how to get it to get the current record on SubForm1?
Adam Schwanz  @Reply  
           
16 months ago
I assume when your on Subform1, it's related to the main form by some field (which makes the Parent/Child relationship), and is not just a random unbound field. What is that ID? I'd think we could DLookup for whatever value you're needing from subform1, and either store it on the main form, or just do the dlookup from form4 even.
Adam Schwanz  @Reply  
           
16 months ago
I imagine we can just do something like
DLOOKUP("ControlCopyID","YourTable","YourField=" & Forms!MyMainForm!YourField
Dave Clark OP  @Reply  
           
16 months ago
Thanks Adam! I have been at this to long today and I am fried. I will revisit this in the morning and let you know how it goes.
Thanks Again!

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

Next Unseen

 
New Feature: Comment Live View
 
 

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: 6/16/2026 7:35:11 PM. PLT: 0s