View Full Version : Problem with Unbound Mastr and Sub form


saleem
01-25-2002, 10:41 PM
i have master and sub form that i use to enter data in two tables with one to many relationship..my problem is that the sub form does not accept more than one entry....any idea

saleem

Haytham
01-26-2002, 10:26 AM
In Properties, Data of the SubForm, make sure that the Allow Addition is set to Yes.

saleem
01-26-2002, 11:10 AM
it doesnt work..let me tell u i have unbound master and detail form and i use event on click to insert data into master and sub table...

Haytham
01-27-2002, 01:55 PM
Ok. Your Form and Sub Form Should be linked by Child -Master relation.
In Properties: Data, click the subform and you have to join both forms by a specific field which should be of same type.
So, If you enter data in the main form, the child form (Sub Form) will allow to add data.
Try it , and if not working just mail me.
Remember, if the Subform is having a Primary Key in relation, it'll not accept than one record.
Regards.

[This message has been edited by Haytham (edited 01-27-2002).]

saleem
01-27-2002, 08:13 PM
When I try to link child form with master it says..cant build a link b/w unbound form.

I manually inserted field name in ‘link child’ and ‘link master field’..but still sub form not accepting more than one entry…

Pat Hartman
01-28-2002, 04:12 AM
This process would not require ANY code if you would use bound forms and link them properly.

I think in one of your other posts on this topic you said that you were inserting the subform's data in code from the main form. If that is the case, that is probably what is causing the problem. Each form should handle its own update process.

In the future, please try to stick to a single thread. Anyone who reads your latest posting will have no clue what your real problem might be.

saleem
01-28-2002, 08:43 AM
when i use bound form it become so slow...thats y i turn to unbound form..i m not inserting sub form data into code..no thats not the case..my problem is how to get fast performing master/child form ???

Pat Hartman
01-28-2002, 09:44 AM
An unbound form is not going to be faster than a bound form.

Haytham
01-28-2002, 10:23 AM
So it's not Child-Master, but UnBound Field.
You are true it'll not accept more than one entry.

saleem
01-28-2002, 10:45 PM
Thanks PAT & Haytham

i use sqlserver2k as back end to my access application. when i use unbound form it opens faster...i think u are not correct in saying that unbound form is not faster than bound..

Is there any way out...making unbound child form accept more than on entry

Haytham
01-29-2002, 11:51 AM
Saleem, Check your mail.
Child can accept more than one entry linked to unbound field.