BTW, if it matters, "MyTable" is the current table when the custom dialog is executed.
You need to wrap the field in quotes. As
Get(FileName) & " " &
GetNextSerialValue ( Get(FileName) ; "MyID")
... note that, since the field is in same table, you can drop the table occurrence name from it and just use the field name. :-)