RE: Help needed on creating a subform
- From: Rod Plastow <RodPlastow@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 11 Dec 2007 23:44:00 -0800
Hi Craig,
Let me attempt to describe what you want to achieve before saying how. You
need a main form bound in some way to your Quote table. This will be a
single form. On this form you need a subform showing all the keywords chosen
for this quote and allowing the user to add further keywords or delete
existing keywords. This subform is bound to your KeywordLink table.
If you haven't done so, design your single form bound to the Quote table.
Next design a continuous form bound to your KeywordLink table. You don't
need to display QuoteFK on your continuous form, it just has to be in the
recordset. Make the single field displayed on your continuous form a combo
box. Through the wizard bind this combo box to your Keyword table or enter
something like
SELECT KeywordId, Keyword FROM Keyword ORDER BY Keyword
in the row source property. Column 1 is the one you want to store; column 2
is the one you want to display. To do the latter set the column widths to
0;something other than 0. You probably also want to switch on 'Limit to
list.' Check also the column count is 2.
Next you need to add the continuous form to your single form. If you're new
to this I recommend using the wizard. If you are asked about link fields
answer QuoteId for LinkMasterField and QuoteFK for LinkChildField.
It should now all work. It's a bit clunky as you will get Access/Jet error
messages if you try to add a duplicate keyword. There is a way of
restricting the combo box list to those keywords not already assigned.
However my advice is get the basics working first.
You could also implement this requirement using selectable list boxes but it
would involve more programming.
Don't hesitate to ask if you don't understand or if you need more info.
Rod
.
- Prev by Date: Re: delete current record in form
- Next by Date: Re: page up/down in subform question
- Previous by thread: Re: Welcoming scrolling workds
- Next by thread: Re: Help needed on creating a subform
- Index(es):
Relevant Pages
|