I'd like to know if a field is present in a format before executing some commands in a macro. So far I had to use a loop that goes through all the field definitions of the current format, which is remarkably slow. I tried the following line (and similar ones):
if ActiveWindow.FieldDefinitions.Item("MyField").name="MyField" then ....
which in my opinion should generate some error if "MyField" is NOT present in the current format, but it always returns the correct name even if the field does not exist in that format. It looks as if specifically addressing a field in a Window object "sees" the field even if it's not there (it is in the database though).
Anyone having a bright idea?
Charles