Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform will not load

Status
Not open for further replies.

load3d

Programmer
Feb 27, 2008
117
US
I have a sidebar that changes the source object of the subform for each button. The form will not load when I add a record source too it. If I remove the record the form loads, every other time it just doesn't do anything. Any ideas?
 
you may be adding the source object but do you still need to make the link with the PK & FK's ? Could you show/hide the subs as required?
 
I'm changing the sourceobject and the form is loading, but none of the drop downs are loading or buttons or text boxes. It's a blank form basically. The code is correct. The PK, and FK's are unique. I can open the forms just fine with docmd.openform "Form name" and they work, but it's not the way I need it to be. I need the forms toload as as a sub form so I don't have boxes hanging out all over the screen. Any other suggestions?

 
How are ya load3d . . .

If your using [blue]Master/Child[/blue] link fields to synchronize the subforms, does each subform contain the necessary [blue]link field?[/blue] [surprise]

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
load3d . . .

[blue]?[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Aceman, cut the guy some slack it's the weekend, did you think maybe load3d can't work on this over the weekend, it's also a long weekend in the states if that is where he's from.

load3d,

The main form should be bound to a table/query...let's say table1, your sub bound to table2...table2 should have it's own ID plus the FK (foreign Key) field (number type)...this FK needs to be linked in the form design ( as Aceman is indicating). Check the Form properties of the subform and make sure "Link Child Fields" & "Link Parent Fields" are filled in correctly...the PARENT is the Primary ID of Table1 and the Child will the the FK of TABLE2...NOT table2's Primary key.
 
Heh. Hey gents, thanks for the responses. I will try this today... I don't think I do have the parent/child links in actually. I will try it and let you know. Thanks a bunch for the responses and especially to Aceman who worked all days and all weekend brainstorming my problem ;)



 
I have a quick question. Is linking the master/child fields necessary if the mainform and it's subform are unrelated?
 
load3d . . .

The answer is No.

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Aceman, sorry I misconstrued your reply when you put "?" followed by See ya... which is part of your signature ( I did not notice at first) which includes links to how to get quick response, it looked like you were being impatient....just the way it tied together.

 
An impatient programmer? Never heard of one. >:)

Still having problems with these forms. Any other possible ideas?
 
I'm just kinda confused by the design, you want the subform to be unrelated, but then technically it isn't a subform

also going back to your first post you mention "record source" and source object, and then remove Record, I'm getting confused....it starts sounding like you have it coded to work with different tables ( of the same layout) but then this line I'm not sure what you are saying...

"The form will not load when I add a record source too it. If I remove the record "...are you removing/ adding a "record" or "Record Source"? just want to clarify what your doing

Also you could add a TAB control to place various forms, might help if you can upload a copy of the DB for us to download ( no personal Data)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top