[AccessD] Continuous subform on a continuous subform

Rocky Smolin at Beach Access Software rockysmolin at bchacc.com
Wed Mar 19 10:17:32 CDT 2008


Thanks to all who replied to this for your suggestions.  I settled on two
sub-forms and that's going to work well.  In the current event of the first
sub-form I'll put a requery of the second sub-form, but I haven't gotten
that far yet.

Because I ran into a problem on the first sub-form which is bound directly
to a table and linked to the main form PK/FK. When I add a record to the
first sub-form I get a message:

"A problem occurred while (application name) was communicating with the OLE
server or ActiveX control."

I click OK and everything carries on successfully. 


The problem seems to be in the record source for the second form.  It is a
query that has a parameter that returns a value from public function.  I've
stepped through the code and the value is returned correctly.  I would like
to requery this second sub-form in the Current event of the first sub-form.
But temporarily I put a Requery into a click event of a button on the second
sub-form and it works - displaying all of the records associated with the
selected record on the first sub-form.

When I delete the second sub-form, or just delete the Record Source for the
2nd sub-form, the error message goes away. The second sub-form is not linked
Master/Child because it shows the detail of the record selected on the first
sub-form and since they're both continuous I could make the 2nd a sub-form
of the 1st.

I have only three references - VBA, 11.0 Object Library, and DAO 3.6 Object
Library.  Compiles cleanly. Decompiled - no change.  The main form sub-form
have no events.

I do not get this error on any other mdb.

Does anyone know what could be causing this and/or have a fix for this?  

MTIA

Rocky






 	
	

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
Sent: Tuesday, March 18, 2008 2:51 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Continuous subform on a continuous subform

The usual way to handle this is to use multiple subforms at the same level
rather than nested.  It's often easier to popup a continuous subform from a
button rather than embedding it.  If you nest at the same level, you pass
the key value up to a control on the parent form, and that's the link the
other subform uses to filter its records.

Charlotte Foust 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
Beach Access Software
Sent: Tuesday, March 18, 2008 2:41 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Continuous subform on a continuous subform

Dear List:
 
I would like to put a continuous subform on a continuous subform, but I'm
getting a message that this can't be done.  So I'm trying to find a way
around this. 
 
The form tracks incoming shipments.  The main form is single form showing
the shipment info in the header.
 
Each shipment can have more than one purchase order. So the purchase orders
are listed in the detail section.  Form is continuous.  So far so good.
 
However, each purchase order can have several lots. And for each P.O.
added to the shipment the client wants to see all the lots attached to that
PO.
The lots and purchase orders are already in the tables.  They're going to
create the shipment last (this incoming shipment thing is an add-on to the
existing legacy system).
 
So the user creates a new incoming shipment and adds existing purchase
orders (incoming shipment POs are in a table with the shipment table PK as
the FK) .  So I've got the purchase orders displaying in a continuous form.

 
But for each P.O. the client wants to see all the lots attached to that PO.
So I think, OK, subform of lots (lots have the PO number as a field) linking
the selected PO numbers to the lots.  Subform in a subform.
 
But no-go.  So, how does one finesse this?  
 
MTIA
 
Rocky
 



 	
	
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.7/1332 - Release Date: 3/17/2008
10:48 AM
 




More information about the AccessD mailing list