Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3
This is the forum to discuss the Wrox book Access 2007 VBA Programmer's Reference by Teresa Hennig, Rob Cooper, Geoffrey L. Griffith, Armen Stein; ISBN: 9780470047033
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 10th, 2012, 07:56 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default PLEASE HELP ASAP -Form- Subform/tabs Linking records

This is due for a presentation tomorrow and I am a beginner at this. I hope that I can explain this well and I thank you for your help in advance.

I have a 5 tabs on a form and I need to generate records on each of my tabs based on the information in a label on the form. for example:

form - x (represents the value in a combobox)

Subform (contains different information all based on x. How do I get the infromation in the tabs to return only the record that matches the varible represented by the textbox x )

Tab 1 x....abc (if x=x return fields a, b and c)
Tab 2 x....def "
Tab 3 x....ghi "
Tab 4 x....klm "
Tab 5 x....tuv (if x=x populate unbound label t, u & v with info from table y)
  #2 (permalink)  
Old September 10th, 2012, 11:20 PM
Authorized User
Points: 257, Level: 5
Points: 257, Level: 5 Points: 257, Level: 5 Points: 257, Level: 5
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2012
Location: Healing, UK
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
Default

Hi,

I am not studying the book so, my apologies, that I cannot direct you to any part of the book that might help you.

However, firstly you will need to change your label control to a textbox control so that you can get the events that you need to code later.

Secondly, what you need to do to get your subforms to work is to change the record source of each subform to a query. Within each query of the subforms you to need to set the selection criteria for one or more of your fields to Forms!<FormName>!<ControlName> replacing FormName and ControlName with the names of your own parent form and textbox control name.

Finally, you need to code one of the textbox events to ReQuery each of your subforms based on the current criteria that has been entered in the textbox using <SubFormName>.requery. It is typically the AfterUpdate event that is coded to requery the subforms but you may need to change this to accommodate what you are doing. i.e. using the OnChange event?

Hope this helps.

Kind regards,

Ian Ryder


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subform linking problem JimTate BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3 0 April 22nd, 2008 11:07 AM
Linking an unbound subform probitaille Access VBA 1 September 13th, 2006 12:27 PM
Filling a form in specified time (Reply ASAP) software_developer_kk Classic ASP Basics 1 March 29th, 2005 04:20 AM
Adding records using form and subform marcin2k Access VBA 3 March 7th, 2005 04:37 PM
Linking Subform using ADO Skharva Access 1 January 13th, 2004 12:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.