Window Launch From A Variable

As I am starting to use XOJO to actually create more than small utlity type applications it becomes clear how little I really know. Here goes the latest question. In a database app I want to lauch a particular window dependant upon the contents of a record and show a modal window depending on the database searched. Is this possible?

Something like pseudo

window(rs.field("table_window")).stringvalue.showmodal

The appropriate window would the be displayed for the records chose from a grid Hope this makes sense.

You can’t store window references in a database. You can store the name of the window and use a Select Case statement:

Select Case rs.field("table_window").StringValue Case "MyWindow1" MyWindow1.ShowModal Case "MyWindow2" MyWindow2.ShowModal Case "MyWindow3" MyWindow3.ShowModal Else MyErrorWindow.ShowModal End Select

Thanks, I was afraid of that, a little cumbersome but it will do the trick.