You can know the form that is actually active by using
oForm = Application.Forms.ActiveForm
Or you can wait for the events et_FORM_LOAD or et_FORM_ACTIVATE to know whether the form you are interested in is opened.
Once you have the current active form and it is of the type you want to read, then you can use
oItem = oForm.Items.Item("ItemUID") ' You can obtain ItemUID with View-> Debug Information
oEditText = oItem.Specific ' Specific will give you the specific object type of the item you asked for
docNum = oEditText.Value ' Into the EditText item type you ask for its value with .Value, it depends on the type of item you will have a different way to obtain the value of the item shown.
Hope it helps
Trinidad Martinez.
Hi,
If possible, you should try to use the DBDataSources (or UserDataSources) instead of directly accessing the UI "items".
DocNum can only by retrieved from the DBDataSource (and only, if the document has already been saved!!!). Please check the SDK 2004 DI API helpfile for more information.
HTH,
Frank
Add a comment