linking a unbound subform (1 Viewer)

faz88

Registered User.
Local time
Today, 13:30
Joined
Mar 31, 2008
Messages
34
Hi,
I am having trouble linking the subform to my main form. Both the main form and subform are unbound. When the form loads all the details show on the main form but it doesnt link with the subform. Is there a way to link the subform with the main form without making the subform a bound form?
 

KenHigg

Registered User
Local time
Today, 08:30
Joined
Jun 9, 2004
Messages
13,327
Not sure if I understand - If they are unbound how the heck are you supposed to link them?
 

RuralGuy

AWF VIP
Local time
Today, 06:30
Joined
Jul 2, 2005
Messages
13,825
And why do you feel the need to use unbound forms?
 

faz88

Registered User.
Local time
Today, 13:30
Joined
Mar 31, 2008
Messages
34
I originally had a bound subform linked to the main table.it was working fine. But my tutor told me i had to make the subform unbound and link it to the main form. Am guessing there is a way to do it.....
 

missinglinq

AWF VIP
Local time
Today, 08:30
Joined
Jun 20, 2003
Messages
6,420
I don't believe that feature is available until the Y3K version, Ken! :D
 

KenHigg

Registered User
Local time
Today, 08:30
Joined
Jun 9, 2004
Messages
13,327
I guess if they're bound when they open you could you the set the LinkChildFields and the LinkMasterFields properties. ?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 13:30
Joined
Sep 12, 2006
Messages
15,755
faz

genrally a subform contains multiple records linked to the main form

1 CD - several tracks

1 Customer - several orders

------
therefore there has to be a link - now unless a form is bound, it can only show a single item, so a form/subform is meaningless in the context of unbound forms

are you sure you got your tutor's instructions right?
 

faz88

Registered User.
Local time
Today, 13:30
Joined
Mar 31, 2008
Messages
34
Hi,
Am certain my tutor said the subform has to be unbound...I think i have to like it using pure VBA.... I tried searching online for information on how to link unbound forms and i couldnt find anything!
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 13:30
Joined
Sep 12, 2006
Messages
15,755
if a form is unbound, its not based on anything - it is merely a collection of textboxes/controls that you will do something with subsequently -

therefore it simply cannot have any intrinsic relationship to another form - so because of this lack of relationship an unbound form cannot logically be a subform.

--------
it could be a mainform, and HAVE a subform, because once it IS populated with some data, that data could be related to some other data. however, this is somewhat abnormal - the Access subform wizard actually prevents you building a relationship between unbound forms
 

missinglinq

AWF VIP
Local time
Today, 08:30
Joined
Jun 20, 2003
Messages
6,420
Hi, Am certain my tutor said the subform has to be unbound...I think i have to like it using pure VBA.... I tried searching online for information on how to link unbound forms and i couldnt find anything!

This alone should tell you something! :rolleyes:
 
M

Mike375

Guest
The only reason someone might have an unbound subform could be to have a static display, perhaps for reference purposes.

I have seen something like this done for a life/disability client display. The subform was tabular and each record was for various medical limits and requirements. The field headings were for brackets of cover, in other words, like 0-250 251-500 501-750 (1000s) etc. The left hand field was for age groups and the other data was the medical requirements applicable to the age and benefit amount.

It was used for a client contact project.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 13:30
Joined
Sep 12, 2006
Messages
15,755
mike - its not really a true subform in the circumstances you describe - it doesnt change as you move from item to item - it might as well just be another form open on the desktop at the same time, or an unbound combobox or listbox, or a popup available on a button click.
 
M

Mike375

Guest
mike - its not really a true subform in the circumstances you describe - it doesnt change as you move from item to item - it might as well just be another form open on the desktop at the same time, or an unbound combobox or listbox, or a popup available on a button click.

Gemma, agree. Strictly speaking it fails on the "sub" part....although dimensionally it was placed on the screen under the client data...so under = sub:D

It had been done this way as opposed to drop downs etc for a couple of reasons. One reason was that it presented in a way that was very similar to how insurance companies suppy such a listing. It also meant the caller did not have to "click" or do anything, just look:)

When I first saw it my first reaction was why not have some linking based on the clients date of birth and hence only one row would show. But what I had forgotten, as was pointed out to me:D was the fellow might ask about cover amounts for his wife. The other issue was the client might have either been right on the edge of an age band or was talking about doing something about cover but "next year" or whatever and where he would be in a different age band.

Although as you say it is not a true subform I wondering if it was applicable to what faz88 is referring to.
 

Users who are viewing this thread

Top Bottom