Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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
 
Old March 26th, 2004, 09:28 AM
Authorized User
 
Join Date: Jun 2003
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by cco2000
 Access will execute the code in the lowest level subform first, which means that the subform (and its code) is probably being executed before the main form has opened/loaded. The quick dirty way of fixing the problem would be to put an “ON ERROR Resume NEXT” statement on the open event of the sub form... not the best solution but it generally works.

If you really want to fix it correctly then you will have to step through the code with the debugger and see what is executing in what order and move things about – possibly by putting certain code on the Current event etc.

There is another method...

You can use the LinkChildFields and LinkMasterFields properties together to specify how Access links records in a form or report to records in a subform, subreport, or embedded object, such as a chart. If these properties are set, Access automatically updates the related record in the subform when you change to a new record in a main form. But, you can still run into another set of problems with using this method – check the Access help files for more.

Good luck dude – isn’t Access fun :)
Thanks for the explanation I'll try to fix it correctly and if worse comes to worse the quick dirty way . I'll let you know; Thanks!!!:)

slypunk
 
Old March 26th, 2004, 01:18 PM
Authorized User
 
Join Date: Jun 2003
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would like to thank everyone for helping me with the database. I finally got it to work! Thanks for your help cco2000 that info. you gave me really helped!!:D

slypunk





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to translate a code in DAO to ADO itsmenow Access VBA 2 July 7th, 2005 09:19 AM
How to speed up looping ADO code? llowwelll Pro VB Databases 7 October 24th, 2004 11:12 PM
Linking Subform using ADO Skharva Access 1 January 13th, 2004 12:27 AM
Linking Forms via a drop down menu brendan82 Beginning VB 6 2 December 15th, 2003 10:11 AM
Forms - ADO.net Book KennethMungwira ADO.NET 0 June 23rd, 2003 01:38 PM





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