Subforms-How do I let user enter data in subform only but not Main

  • Thread starter Dave - Need help with my form
  • Start date
D

Dave - Need help with my form

Hi, I have created a main form/sub form. The main form is based on the
Employee table and the sub form on the Holiday table.
I want to be able to look up employee details in the main form and allocate
holidays on the sub form. I can do this BUT I can’t figure out, how to stop
the user from entering information/modifying the Employee data in the main
form, but allowing them to update/add data to the sub form? I also want to
add some kind of search button to search for an employee?
Thanks for your help!
Dave
 
J

John W. Vinson

Hi, I have created a main form/sub form. The main form is based on the
Employee table and the sub form on the Holiday table.
I want to be able to look up employee details in the main form and allocate
holidays on the sub form. I can do this BUT I can’t figure out, how to stop
the user from entering information/modifying the Employee data in the main
form, but allowing them to update/add data to the sub form? I also want to
add some kind of search button to search for an employee?
Thanks for your help!
Dave

The main Form must allow updates for its subforms to be updateable - but the
*controls* on the form need not be. Just set the Enabled property of all the
mainform controls to No, and the Locked property to Yes; this will display the
mainform data but prevent the user from editing any of it (or even setting
focus to the controls).

To search for an employee use the Combo Box wizard to add a Combo to the form.
Choose the option "Use this combo to find a record". This combo must be
unbound (nothing in its Control Source), and this one control's Enabled must
be Yes, Locked must be No.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top