On Dec 11, 6:42 pm, Craig <craig...@gmail.comwrote:
I am trying to create a form that shows quote info, but also has a
subform that lists all keywords and allows you to select multiple
keywords to associate with that quote. I have never done a subform
before and am struggling a little with it as there is an element of
indirection involved.
Any pointers would be greatly appreciated.
A summary of my DB so far is:
Keywords:
- KeywordID
- Keyword
Quote:
- QuoteID
- Quote
KeyworkLink:
- KeywordFK
- QuoteFK
It might be best to practice with something simple to get the idea of
how FORM / SUBFORM works and behaves during use, and then elaborate
with your QUOTE / KEYWORD details.
First make two tables, and then make a form for each table.
Pick a table to represent the top of the hierarchy, this will be your
main table. The other table will be your sub.
Now open the form that points to the main table and make some extra
room to allow space to place your sub form.
Now, with this main form in design view look for the subform icon on
the toolbar and click it. Now use the mouse to drag a rectangle to
represent the space for your sub form. After you do this the access
subform tool wizard should ask you to select a form that will go in
this place, and then you will be asked to indicate what variables will
link the two. After you indicate one variable (aka, field) you will
see an option to enter up to two more variables for the linkage (just
use one for starters as you need to see how the form/subform works).
Once that's done you may need to tweak the size of the main and sub
forms by going in and out of design view and form view. Once you are
satisfied with the look of things you can play around by entering some
test data. Then close your form and look in the tables to see where
the test data have been written.
As you do this you will probably begin to see how to elaborate the
simple structure to fit your design objective of making a main/QUOTE
table/form with subform/KEYWORD details.
I hope this information is helpful.
-- Bill