Computer Learning Zone CLZ Access Excel Word Windows

Education is the key to unlocking the world, a passport to freedom.

-Oprah Winfrey
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Visitor Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Find a record on a subform
Fred van der Zwalm 

3 years ago
i am at a loss as to what to do. It seems a pretty simpel isue. However I can not find a solution. The problem: "How to find a specific value in field of a record on a subform using an unbound field in the mainform as searchfield and after that set the focus on that specific record or field on the subform". I tried the following code, but that was not working:

Private Sub ZoekGoedBtn_Click()

Dim strSearchValue As Variant
Dim intRecordNumber As Integer
' Get the value of the search field from the main form.
strSearchValue = Me.Zoekgoed.Value
' Find the first record in the subform that matches the search value.

intRecordNumber = Me.Tussentabel_Subformulier.FindFirst(strSearchValue)
' If a record was found, set the focus to that record.
If intRecordNumber <> 0 Then
  Me.Tussentabel_Subformulier.SetFocus
End If

End Sub

For your information: 'Zoekgoed is an unbound searchfield in the main form. 'Tussentabel_Subformulier' is the subform. It seems that .FindFirst is not working. Can you help me out or provide a solution. Thanx again.

Grt.
Fred

Kevin Robertson  @Reply  
           
3 years ago

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Visitor 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/17/2026 4:24:38 AM. PLT: 1s