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 September 27th, 2004, 05:26 PM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Weird Access Problem

I'm having an odd situation come up within the access database that I am currently working on.

I have two seperate forms, and each form has a subform that accesses the same table. It is possible to input data for a given main record in either subform, and it should be possible to go back and forth between them.

What is odd is that in the second form/subform, I am having an issue when I attempt to access that data. If I have just entered a new record into the subform of the first form, then the second subform is incapable of working. It displays no data for any main record (not just the one that just received data). If I close down the form and open it again, everything works fine. I don't understand why the program is doing this. In the second form, I have a drop-down box which selects the ID of the main record, and when that is changed, it assigns the recordsource of the subform in code. That part seems to work fine, but it does not seem to change the recordsource property of the actual object.

Does this problem sound familiar to anybody and can it be solved?


Mat
 
Old September 28th, 2004, 01:55 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If ur subform and main form have a one-to-many relationship u cant enter new
data in the many side of ur form without entering data in the one side (main form).That what suggest me ur post but an elegant solution i dont have.
Regards P.

 
Old October 1st, 2004, 02:10 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 1 Time in 1 Post
Default

Matt,
In my understanding you are working on three tables.
The first two tables are for the main forms (tbl1 & tbl2).
And the last table is for the subform (tbla).
I do not think there is a program problem.
Not because you updated a subform1 (tbla) with
mainform1 (tbl1)
will update it in mainform2 (tbl2)
with the same recordsource as in subform2 (tbla).

If you want to update fields in a subform (tbla) that automatically
update fields on related main forms/tables you will be better
of with AfterUpdate function VBA code.
I hope this helps.
John







Similar Threads
Thread Thread Starter Forum Replies Last Post
weird problem with Ch 9 example proslambano BOOK: Ivor Horton's Beginning Visual C++ 2005 1 February 2nd, 2007 02:06 AM
Weird error when inserting into Access!!! tryston02 ASP.NET 1.0 and 1.1 Basics 1 April 6th, 2005 07:30 AM
weird access violation Yosi Visual C++ 0 January 6th, 2005 05:19 AM
weird problem! Please Help johnjohn Classic ASP Databases 5 December 21st, 2004 10:27 AM
weird Oracle problem! pankaj_daga Oracle 2 July 12th, 2004 09:33 PM





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