Best Way to embedd a sub form.

T

TravelingHT

--
Anthony Williams
Histotech Exchange LLC
19 Whitmore St.
Lexington, VA 24450
(e-mail address removed)
 
T

TravelingHT

Now that I have given my info to the web crawlers.

I want to know if there is any "Best Way" to adding sub-sub forms.

Should you open a sub-form as a main form, then add the sub-sub form. Then
close the main form/sub-form and open the real main form and then dump the
whole lot in the main form.

Or

Should you open the main form, drag the sub-form into the main form from the
list of forms. Then drag the sub-sub form into the space in the sub-form.

Is there one way over the other that can cause or prevent problems
especially if you have querys that cross from the sub-sub form to the main
form and back again.

Especially intrested in what the forms names will be, as referenced to by
the comuter and how link master, link child fields will be filled.

Thanks in advance.

TravelingHT
 
G

Golfinray

You normally build a mainform and subforms in a one-to-many relationship. The
mainform is the one side, the sub the many side, ie., one customer, many
accounts. Each sub needs to be linked to the main by something common to
both, like an ID. You could build the sub and "drop" it onto the main, but it
is easier to let the subform wizard build and insert it for you using the
link you choose.
 
T

TravelingHT

Dear Golfinray:

I am not to worried about child keys and master keys and the one to many
relationship I have all of that down. Assuming that all else is correct.

I am wondering on the best way to build a sub sub form in a form.

1. Open up what will be the sub form and drop in the sub sub form, then drop
that lot into the main form.

2. Open the main form, drop in the sub form, then drop in the sub sub form.

Is there a difference between these aproaches and if so what?
 
R

Rob M.

I believe AccessVandal was right and so was TravelingHt when they suggested
the linking of the subform as possibly the may side to your relstionship for
data. The wizard will allow you to determine your own choices.

The naming convention is fsub_yoursubformname and fsubfsub_yoursubformname.
You will have 2 subforms. I think you might be after gatting the focus back
to main form after you have lost the focus on your second subform. I'm not
sure about the code, but it might be:

Me.Parent.Subform2.SetFocus
Me.Parent.Subform2.Control2.SetFocus

I just copied this from Douglas Steeles response on another question about
subforms on this forum. Thanks Douglas, I hope you don't mind.

Rob M
 

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

Top