The following function opens an entry form.
The acDialog option dis-allows the:
Forms!frmCalEvent!StartDate = tmp
Forms!frmCalEvent!EndDate = tmp
Lines of code to populate because the code is waiting for a response.
The reason this option resides in the code is because the Form_Current will not operate without it.
Is there a way to pass these “tmp” values into the form before acDialog prompts.
Function dateDblclick(id) Dim Response As String Dim tmp As Date 'On Error GoTo ErrTrap tmp = strMonth & ". " & Me("label" & id).Caption & "/" & intYear
If Me("id" & id).Caption = "" Then Response = MsgBox("Event does not exist for this date." & vbCrLf & _ "Create a new Event ?", vbYesNo, "Create Entry")
If Response = vbYes Then DoCmd.OpenForm "frmCalEvent", , , "[ID] = " & 0, , acDialog Form_Current Forms!frmCalEvent!StartDate = tmp Forms!frmCalEvent!EndDate = tmp Else End If Else DoCmd.OpenForm "frmCalEvent", , , "[ID] = " & Me("id" & id).Caption, , acDialog Form_Current End If 'ErrTrap: End Function