Form/subform strategy help needed.

G

Guest

Ok... I have a database I've been working on extensively. I recently ran
across an issue where refreshing records causes a stack memory problem and
the program crashes. I had one main form with 5 subforms . The fifth subform
then had 3 more subforms. There are no additional forms or subforms. I have
tried creating a 'wizard' type series of forms to input the data for each
subform separately (so a smaller number of forms/subforms are open
simultaneously), but for whatever reason, I cannot get one form to pass the
linking field's data to the next form, most likely because at that point,
there are no matching records existing for any of the tables upon which the
subforms are based. For example, I've tried having FormA create records for
ParentTableA, then close FormA when finished to open FormB, which contains
the primary key from ParentTableA, then a subform for table ChildA. However,
I can find no method that opens FormB with the desired record added using
FormA. I could manually type in the linking data, but surely there is a way
to make this work automatically.
 
G

Guest

There are a couple of ways to do this. Which you use depends on how you are
structuring your recordsets and personal preference. Both use arguments of
the OpenForm method. One is to use the Where argument. It will limit the
recordset of Form B based on the Where condition. The other is the OpenArgs
argument. Pass Form B a value that it can use in the Load Event to point to
a specific record or to set it's filter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

control name literal 1
Call subform only when needed 5
Simple syntax in a form 2
Access Reference Subform's Control 0
SubForm Report 2
Expression is typed...... 2
Subform help for a case management database 7
Using a parameter 1

Top