Suing Subform disables all other forms and buttons on main form

  • Thread starter Thread starter red6000
  • Start date Start date
R

red6000

Hi,

I have a from with buttons nd 2 subforms.

When I click in the 2nd subform, I am then unable to click in any of the
other subforms or buttons on the main form.

It's as though by clicking in any of the controls on the 2nd subform is
disabling all controls on the main form/other subforms.

Any ideas what may be causing this?

Thanks
 
It seems its when I run the command button on the subform that it is
happening. The code for the Command Button is:

Private Sub AddAnotherTask_Click()

Forms!InputForm2!Activities.Form!EmployeeID =
Forms!InputForm2!MainTimesheet.Form!EmployeeID.Value
Forms!InputForm2!Activities.Form!WorkDate =
Forms!InputForm2!MainTimesheet.Form!WorkDate.Value

If IsNull(Forms!InputForm2!Activities.Form!TaskNo) = True And
Forms!InputForm2!Activities.Form!StartTime.Value = 0 Then
Exit Sub
End If

If IsNull(Forms!InputForm2!Activities.Form!TaskNo) = False And
Forms!InputForm2!Activities.Form!StartTime.Value = 0 Then
MsgBox ("Please enter time spent on task!!")
Exit Sub
End If

If IsNull(Forms!InputForm2!Activities.Form!TaskNo) = True And
Forms!InputForm2!Activities.Form!StartTime.Value <> 0 Then
MsgBox ("Please choose a task!!")
Exit Sub
End If


DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.GoToRecord , , acNewRec
Me.EmployeeID.Value = Forms!InputForm2!MainTimesheet.Form!EmployeeID
Me.WorkDate.Value = Forms!InputForm2!MainTimesheet.Form!WorkDate
Forms!InputForm2!MainTimesheet.Form!TaskHours.Requery
Forms!InputForm2!MainTimesheet.Form!TaskTotal =
Forms!InputForm2!MainTimesheet.Form!TaskHours

End Sub
 

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

Back
Top