I am trying to open a modal form with the code below, but the error that is being reported is that the form is not defined. I'm new to VB.Net, so I know this is probably a basic question, but what am I doing wrong and how do I "define" a form? ---Tony---
Private Sub c1Schedule1_BeforeAppointmentCreate(ByVal sender As Object, ByVal e As CancelEventArgs) Handles C1Schedule1.BeforeAppointmentCreate
' Don't show built-in form
e.Cancel = True
' Create new Appointment object with currently selected DateTime and default
Dim app As Appointment = C1Schedule1.DataStorage.AppointmentStorage.Appointments.Add(C1Schedule1.CurrentDate, TimeSpan.FromMinutes(45))
' Create frmMakeAppt for the new appointment
Dim f As New ExcerciseForm(C1Schedule1, app) <----Here is where the error occurs
' Show form
If f.ShowDialog() <> DialogResult.OK Then
' If user closes form without saving, remove appointment
app.Delete()
End If
End Sub
Private Sub c1Schedule1_BeforeAppointmentCreate(ByVal sender As Object, ByVal e As CancelEventArgs) Handles C1Schedule1.BeforeAppointmentCreate
' Don't show built-in form
e.Cancel = True
' Create new Appointment object with currently selected DateTime and default
Dim app As Appointment = C1Schedule1.DataStorage.AppointmentStorage.Appointments.Add(C1Schedule1.CurrentDate, TimeSpan.FromMinutes(45))
' Create frmMakeAppt for the new appointment
Dim f As New ExcerciseForm(C1Schedule1, app) <----Here is where the error occurs
' Show form
If f.ShowDialog() <> DialogResult.OK Then
' If user closes form without saving, remove appointment
app.Delete()
End If
End Sub