General information
Category:
Forms & Form designer
>>I have a thing table and a location table related many to many (some of you talked me into it) using a common child table, giving thinglocations. The location table didn't exist before. I had a form with controls for thing.fields and a grid for thinglocations, which was just a child. All that is in the location table is a key and a location number, which was in thinglocations. The grid still needs to show location numbers, but now they are not in the grid.recordsource. This old app was designed for standalone use and uses tables, not views. I just realized that I'm not even sure about the correct way to use views with a basic parent-child form that uses a grid. Thank you.
>
>Bret, be sure your views are updateable (there are several items to check on the view designer, and you must include the primary key fields for any underlying tables you wish to update). Then just issue a tableupdate() as you probably did with the tables. Changes go through the view into the tables.
>
>Are you using a parameterized view for your grid? That's the easiest way, where the parameter is the parent key.
>
>HTH
>Barbara
I made a view with a parameter for thing_id. The view is joined on location_id and has every field in thinglocation. I suppose that the other controls in my form should still be linked to the thing table, or a view of the thing table. How do I get it to put the current thing_id into the parameter instead of asking me for it?
To clarify my earlier question for the benefit of others, my tables are:
thing: thing_id, thingfield1, thingfield2 ...
location: loc_id, locnumber
thinglocation: thing_id, loc_id, thinglocationfield1, thinglocationfield2 ..., linked to the other two tables on the key fields.
I want thing.thingfield1, thing.thingfield2 ... in the other form controls, and location.locnumber, thinglocation.thinglocationfield1, thinglocation.thinglocationfield2, ... in my grid.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only