Code is falling through

I have an issue, where, when I execute this code, I don’t get a wait to select a date. It falls through to the connect to database.

/

/ ok, so we are going to set alarms one by one instead of a general one
windowSetTheAlarmDate.show

var singleAlarmSetDB as New SQLiteDatabase
var singleAlarmSetRS as RowSet
var singleAlarmSetString as String
var uniqueAlarmDate as DateTime

singleAlarmSetDB.DatabaseFile = SpecialFolder.Documents.Child("xojo programs").Child("newToDo").Child("ToDoDatabases").Child(“ToDoAlarms.sqlite”)
'// here is the insert statement
singleAlarmSetString = "insert into EventAlarms (AlarmTask, AlarmDate) VALUES ('" + ToDoWindow.TaskListBox.CellTextAt(ToDoWindow.TaskListBox.SelectedRowIndex,1) +"','" + ToDoWindow.TaskListBox.CellTextAt(ToDoWindow.TaskListBox.SelectedRowIndex,2) + “‘)"

'// See if I can connect to the database
‘
Try
  
  singleAlarmSetDB.Connect
  
  MessageBox “Connected”
  
  // so now that we have a date / time selected for the alarm, let's write the entry to the ToDoAlarms.sqlite database
  // then we can go through IT to check if any alarms are needed.
  
  singleAlarmSetRS = singleAlarmSetDB.SelectSQL(singleAlarmSetString)
  
  // let them know the entry has been done
  MessageBox "Record added to the Alarms DB”
  
Catch error as DatabaseException
  
  MessageBox "Error Connecting to the Database : " + error.Message + “ "
  
end try

I verified that this is indeed happening by doing a walkThrough step-by-step.

Any idea as to why?

Regards

.show vs. showmodal?

2 Likes