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 Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
how to query data subform
Peter van Soest 
    
4 years ago
With "Microsoft Access Letter Writer" Richard shows how to select data from a certain contact record, for use in a letter.  In a separate query the contact table and the customer table are combined.
with =Forms!ContactF!ContactID you select the record that is open.

My contact form however is a subform on the customer form, and I cannot figure out how to select the contact record.

something like
=Forms!CustomerF!ContactF!ContactID doesn't work

Is there a way to select the subform? Or do I need to open the contact form separately?

tnx in advance for help,

Grts Peter
Peter van Soest OP  @Reply  
    
4 years ago

Dan Jackson  @Reply  
            
4 years ago
Try Value From a Form
I think he mentions something about sub forms here
Scott Axton  @Reply  
        
4 years ago
Referring to a subform takes a little bit different notation.
Forms!ParentFormName!SubformFormName.Form!Field

Access Developer 7  ( Lesson 1 )

Value From a Form  ( Extended Cut )

subform Bang! v Dot.   ( @timestamp 7:25 )
Peter van Soest OP  @Reply  
    
4 years ago
Hi Scott Forms!ParentFormName!SubformFormName.Form!Field
would be =[forms]![BedrijfF]![ContactmomentF].[form]![ContactmomentID] in my case, but that does not work as well.
Peter van Soest OP  @Reply  
    
4 years ago

Adam Schwanz  @Reply  
           
4 years ago
I've never seen =[forms]! I don't think you can do that, maybe you can. Try without those first.
=Forms!BedrijfF!ContactmomentF.form!ContactmomentID

Also verify the name of your subform. Make sure that it is called ContactmomentF. Even if that is the name of the form, the object could have a different name on your parent form.
Peter van Soest OP  @Reply  
    
4 years ago
"....the object  could have a different name on your parent form."
THAT'S THE ONE!!
The name of the object was different than the name of the form itself, I changed it and  now it works fine, tnx a lot!!
grts Peter

Scott Axton  @Reply  
        
4 years ago
Good job Adam - I didn't think of that one.

Glad you got it sorted out Peter!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access 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: 5/6/2026 4:29:20 AM. PLT: 0s