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 
LinkChildFields Error 3071
Michael Foster 
    
6 years ago
Bkgd: I have a subform that I want to link to 2 comboboxes (cboBldg and cboCat).  Both comboboxes are built on UNION queries to add an "All" selection.  I use VBA to change the LinkMasterFields and LinkChildFields based on 3 cases (actually I use If/Then...I've tried getting rid of the If then)
Case 1
--Forms![main]![subform].LinkMasterFields = "cboBldg, cboCat"
--**Forms![main]![subform].LinkChildFields = "Bldg, Cat"**
Case 2
--Forms![main]![subform].LinkMasterFields = "cboCat"
--**Forms![main]![subform].LinkChildFields = "Cat"**
Case 3
--Forms![main]![subform].LinkMasterFields = "cboBldg"
--Forms![main]![subform].LinkChildFields = "Bldg"

**These lines returns the 3071 error.  Bldg and Cat are fields in the subform (and the cboXX are controls in the unbound main form)

The cboBldg/Bldg never returns the error.

It compiles and does not appear to be syntax.

Any help would be appreciated,
Mike
Richard Rost  @Reply  
          
6 years ago
I'm assuming you've run down the Troubleshooter.

Make sure Bldg and Cat are both control names AND fields bound to the subform recordsource.

Cat isn't a reserved word, but I don't like it. Try switching it to something else like MyCat, just to be sure. Seems like Bldg is working OK. Or maybe go with [Cat].
Michael Foster OP  @Reply  
    
6 years ago
Thank you - the problem is resolved, although it doesn't make too much sense how it was fixed:
- Bldg is a string (short text)
- CAT is a number (long integer)
----so I changed CAT to a short text and everything worked.
Richard Rost  @Reply  
          
6 years ago
Is cboCat also a text value? They have to match (parent/child).

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/8/2026 8:09:31 PM. PLT: 1s