Enable controls in subform???

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I have a form in which there is a control, "Date" that searches for records in my subform that match that date. If a record is found, the subform displays that record. Otherwise, an error message pops up saying there was no record found. In this event, the user may click on the Add Record button on my subform to add a new record.

Here's my issue: the subform currently displays the recordset starting with the first (I believe) record. I want to avoid users accidentally entering data (thus over-writing an existing record) by somehow disabling the input unless the add button has been clicked. However, I also would like for the subform to be enabled if a matching record was found. Is it best to use a macro or use code - and where is the best place(s) to put such macro/code??

Thanks
Carrie
 
Back
Top