Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
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 April 4th, 2005, 12:58 PM
Friend of Wrox
 
Join Date: Aug 2004
Location: , , .
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Seems to have found the trick ! I've used the wizard to design form and subform. My first try was to use form and a nested subform as a solution to the problem.
I've given up because of the coding difficulties i've found when working on
the subform. Although, the wizard asks how u want ur design: #1)form - subform or
#2)form - linked form. I took for granted that either way would ask the
user with same input when prompted. Although, the alternative #2 needs an extra input: the link field value between the two forms. As i have had settled the
text box property to Vesible = No, which worked OK on #1, the error message" ...Record required" was displayed on #2.
rgds P.

 
Old April 4th, 2005, 08:01 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Seattle, WA, .
Posts: 248
Thanks: 0
Thanked 1 Time in 1 Post
Default

The message you indicated is the last I mentioned where your referential integrity is preventing you from adding a record. I think you discovered that the reason this doesn't work was that you hadn't properly linked the subform using the Master/Child Link Fields. When you tried to enter data, in the subform, it didn't know which employee you were trying to add it to. In fact, it was likely trying to add it to a Null Employee ID.

So just set up your Master/Child Link Field properties correctly.

By the way, you don't have to create a field for the ID field. As long as the ID field is in the Record Source for the form, it will work.

Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group
http://www.pnwadg.org
 
Old April 4th, 2005, 08:40 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Seattle, WA, .
Posts: 248
Thanks: 0
Thanked 1 Time in 1 Post
Default

I meant to say that you don't have to create a field on the fsuborm for the ID field and then make it Visible = False. As long as the field is in the Record Source for the subform you can use it for the Child Link Field.

Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group
http://www.pnwadg.org
 
Old April 5th, 2005, 05:50 AM
Friend of Wrox
 
Join Date: Aug 2004
Location: , , .
Posts: 159
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've used the MsAccess wizard-form to create the form - linked form. I have
chosen the link alternative and have made Visible=False for the ID field.
So, when asked to fill the ID field, the field was not displayed. I would
suggest that Ms form wizard links the fields as it does when form and nested
subform alternative is chosen.
Thanks u all.
rgds P.





Similar Threads
Thread Thread Starter Forum Replies Last Post
General Naming(reaching) buttons kekec3778 Beginning VB 6 3 January 8th, 2008 05:05 PM
My Comments on reaching the end of the book Nick Y BOOK: Ivor Horton's Beginning Visual C++ 2005 0 August 5th, 2006 07:26 AM
Problem putting code on the right event - SubForm mmcdonal Access VBA 0 November 24th, 2004 01:55 PM
Urgent!! code for no match in Subform based query smercer Access 3 September 10th, 2004 11:15 PM
Filter Subform B Based on Field in Subform A SerranoG Access VBA 3 June 18th, 2004 12:23 AM





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