Re: Subform problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Amy Blankenship" <Amy_nospam@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:O6iUKmrnFHA.3656@xxxxxxxxxxxxxxxxxxxxxxx
> Hi, all;
>
> I am working on a database that allows you to enter data that will be used
> to power an e.learning course. Some of the pages in the course will have
> pages, and some won't. But each question, when it appears, will appear on
> only one page for now but may need to be reused in the future. Rather
than
> having columns for the question-specific information in ALL pages, I have
a
> separate questions table, and the Page table is related to it by the
> QuestionID. So in other words, some pages will have a null questionID if
> there is no question, and some will have a questionID.
>
> I have a page form set up with a Question subform. I was hoping that when
I
> changed to a new, blank page and created a new question, it would create a
> new question and automatically assign its QuestionID to the page field.
> However, what happened was that on the first page, it created a record
with
> a QuestionID of 0(!). On subsequent pages, edits on the Question subform
> are ignored, and when you return to the page you'll see just the one
> question referred to again.
>
> When I created the subform, I was prompted to define the exact
relationship
> between the tables, since it was parent to child rather than child to
> parent, but whatever I did apparently didn't tell Access exactly what I
> wanted from the form>subform relationship.
>
> What should I do to help Access figure out that it should create a new
> question when I fill in a blank question form and assign its ID to the
> parent form's QuestionID field?
>
> Thanks;
>
> Amy
>
>

The form/subform structure is specifically designed to reflect one-many
relationships, you really can't turn it upside down like this.

I would suggest that you have a "question" field on your Page form, as a
combo box or whatever is appropriate to enable a choice of existing
questions, and next to the "question" field you have a "New Question" button
that pops up a form which allows the entry of a new question.


.



Relevant Pages

  • Re: Serious, moderate discussion about Wesley Snipes.
    ... matter than "might is rightly used in self defense." ... Power is the ability to cause an effect. ... A parent has power and authority over a child, ...
    (misc.taxes)
  • Subform problem
    ... I have a page form set up with a Question subform. ... I was prompted to define the exact relationship ... since it was parent to child rather than child to ... parent, but whatever I did apparently didn't tell Access exactly what I ...
    (microsoft.public.access.forms)
  • Re: PLEASE Pray if you want or can
    ... thinking of God as the parent of a small child is exactly ... how I started my earliest conception of "a power greater than myself." ...
    (alt.support.stop-smoking)
  • Re: Only child having only children?
    ... I don't think one, or the other, has 'veto' power (especially if it's ... How can you being a child into the world when one parent doesn't ...
    (misc.kids)
  • Re: Attention one and all - Whatcha all lookin for???
    ... My DS and his ex just came to an agreement for joint custody last night. ... Everyone gets 50-50 - no one parent has more power than they other. ... > he has the nerve to call this child a liar. ...
    (rec.crafts.textiles.quilting)