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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link unbound form to bound form

Status
Not open for further replies.

Luzbel

IS-IT--Management
Apr 20, 2007
45
PR
I have a database that in Table form it shows the subdatasheets that make
refrence to the main table. It is basically a Menu ordering system. Goes
something like this:
MenuByCycle (Contains: Cycle and year), MenuByDay (Contains: Day), MenuByDiet
(Contains: TypeOfDiets), FoodItemsByMenu (The actual menu items)
That was my best attempt to normalize the database.
Like I said in the beginning, in Table subdatasheet form I can view the sub
tables and add values. I am trying to port this to Forms.
I have made a form that filters (via Recordset) a subform to the
FoodItemsByMenu table. I can view the subform (datasheet) by each type of
filter, but I want to be able to link the foreign keys from the parent form
so that I don't have to enter them repeatedly. The parent form is unbound
since it is just to search by cycle, year, day and TypeOfDiet. This
information filters the subform so it displays the FoodItemsByMenu table to
view and input new records if necesarry.

I tried using the same query as record source for the main form as it really
doesn't matter, since it says can't build a link between unbound forms, and
didn't work.
 
Yes, you can link unbound forms but the wizard does not let you. People think you have to pick a field to link to, but actually you can link to any control, bound or unbound.

Without a description of your tables this is hard to answer.

But lets assume that your main form has a text box "txtBxMenuID" and all of your subforms have a foriegn key "fkMenuID" which is linked to the main table.

in the subforms

link master: [txtBxMenuID]
link Child: fkMenuID
 
How are ya Luzbel . . .

Your out of reality with this one (unbound mainform, linked to subform). It would be better if you told us what your really trying to do ... or give more details!

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
AceMan,
I disagree with the unreality of doing this. I do this quite often. I have a current form I am working on a large application.
Main form: unbounded with a combox
SubForm 1: continous form, linked to the combo box
which updates a hidden text box on the main form
on the oncurrent event
subForm 2: continous suborm, linked to the hidden text box.

Select an item from the combo, shows related records in subform 1, and subform 2 shows all related records to the selected record in subform 1.
 
Howdy MajP . . .

[blue]Understood![/blue] It just seems that way to me because I've never had to invoke this type of schema. So its harder for me to attach [blue]real[/blue] to it ...

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top