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 December 20th, 2004, 03:50 PM
Authorized User
 
Join Date: Aug 2004
Location: , , Belgium.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default Subform only may contains 1 record

Hi All,

I'm developing a form with a cost subform. One problem, this subform may only contain 0NE record(this record has more than 10 fields on it)
Is there a way this can be done ?

Greetz from Belgium

Stan

 
Old December 20th, 2004, 04:25 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Hi Stan,

If there can only be one record, is it worth including those fields with the parent record? Or, if you link your subform to the primary key of you main form, then as long as the table that is linked to your subform only contains a single record for each record in the main form, then you should be OK.

Mike

Mike
EchoVue.com
 
Old December 21st, 2004, 03:44 AM
Authorized User
 
Join Date: Aug 2004
Location: , , Belgium.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This option don't seem to work, I've always getting a error message !!
Do you know if a work-around is available ?

 
Old December 21st, 2004, 07:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Norwich, Norfolk, United Kingdom.
Posts: 129
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Stanny,

Can you give more info, as Mike's suggestion works for me.

Best wishes,

Clive Astley
 
Old December 21st, 2004, 10:33 AM
Authorized User
 
Join Date: Aug 2004
Location: , , Belgium.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default


I've used a workaround and put all the 10 cost fields in the Primary table, of course this works fine, I only hope this give no slower performance

Thx for your assistance

Stan

 
Old December 21st, 2004, 11:17 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

If you do see that it is affecting your performance, try and just add a field like Cost_FK to your primary table, and then create a Cost table with Cost_PK and the 10 required fields. Set the recordsource of the subform to the Cost table and set the bound property of the subform to Cost_FK. The value in Cost_FK should corrospond to the value in Cost_PK.



Mike
EchoVue.com




Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting a record from a subform captainlove Access VBA 3 May 1st, 2008 11:38 AM
How do I delete a record from a subform captainlove SQL Server ASP 1 April 29th, 2008 12:01 AM
Going to a specific record in a separate subform discorhino Access VBA 2 August 7th, 2006 12:35 AM
setting subform to new record skinny Access 4 January 3rd, 2006 02:57 PM
Creating a new record in a subform dlamarche Access 3 February 18th, 2005 12:33 AM





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