By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,658 Members | 1,501 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,658 IT Pros & Developers. It's quick & easy.

Help needed on creating a subform

P: n/a
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
Dec 12 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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


Dec 12 '07 #2

P: n/a
Thanks for both your responses.

I am able to create a main form for my quote with a subform of
keywords. The keywords are a continuous form of comb boxes that you
can choose and add to. I have not played around yet to get it really
nice (e.g. removing some of the form controls I don't need seen,
making it easy to delete a keyword etc), but the basics are there.

What I was hoping to have was a selectable listbox of all Keywords
that the user could then select multiple instances of. To me that
would be a much more user friendly way of doing it, but YMMV.

Rod, you mentioned that this was possible with some programming. I'm
not adverse to a bit of programming, so if it is not too convoluted
I'd like to give it a try. What do I need to do?

Thanks again.

Craig
Dec 13 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.