subform cannot enter new data

  • Thread starter Thread starter mon
  • Start date Start date
M

mon

Hi helpers
My main form is set to Data Entry "yes". The subform has
all (except one) fields locked and one field for editing.
However I am unable to enter into the new record on the
subform. I have tried to have a command button (on the
main form, because the subform is in database view) to
open another form for inputting the subform data, but I
obviously need to link it to the record that is displayed
in the subform, so that it comes up with the Jobnumber,
but I don't know how to do that. What is the best way of
going about this?
Thanks
Mon
 
mon said:
Hi helpers
My main form is set to Data Entry "yes". The subform has
all (except one) fields locked and one field for editing.
However I am unable to enter into the new record on the
subform.

Why? Does it not let you create a blank new record? Or does it *let* you
create a blank new record, but not let you type any data into it? Remember,
if you have locked some controls, you will have to unlock those controls
before you can enter any data into them, in a new record. The Locked
property applies to the control *in all cases* - existing records, and new
ones.

I have tried to have a command button (on the
main form, because the subform is in database view) to
open another form for inputting the subform data, but I
obviously need to link it to the record that is displayed
in the subform, so that it comes up with the Jobnumber,
but I don't know how to do that. What is the best way of
going about this?

The LinkMasterFields and LinkChildFields property of the main form's subform
control, is what you need here. More online helpfile reading for you, mon
:-)

HTH,
TC
 
Thanks TC (are u totally sick of me yet???)
I can put a subform into a main form, but in this case the
form opens up from a command button and isn't a subform as
yet so it doesnt have the link lines in the property box.
Oh help I am not having a lot working for me at the moment.
Thanks mon
 
are u totally sick of me yet???

Nope, it's fun to be helping you :-)

If the other form is displaying records that are related to the current
record in the main form, then, it probably *should be* a subbform. Then you
could use the LinkMasterFields and LinkChildFields properties to link those
forms together. If you don't do that, & you connect the two forms with an
OpenForm call, you will have to write lots of non-trivial VBA code to tie
them together. Why not make the second form a proper subform?

mon, I'm off for 24 hours in a few minutes, so I won;t see your're reply
until tomorrow.

Cheers,
TC
 
Well TC I made a subform out of it and now I am having
probs with that. I 've requeried in Forms area. (If you
are interested)
 
Back
Top