on 06-04-2004 11:04 AM
Hi,
I'm trying to get the values from some standard fields and some UDFs on the Sales Order form
Everything works fine for the standard fields but I get an error on the UDFs
Here's my code
'This bit works fine
Set oForm = SBO_Application.Forms.Item(FormUID)
Set oItem = oForm.Items.Item("8")
Set oEditText = oItem.Specific
strDocNum = oEditText.String
'This bit doesn't work
Set oForm = SBO_Application.Forms.GetFormByTypeAndCount(-139, 1)
Set oItem = oForm.Items("U_CrPrj")
'The next line causes a type mismatch error????
Set oEditText = oItem.Specific
strDocNum = oEditText.String
Anyone out there have any idea where I'm goin wrong?
Thanks
That was exactly the problem!
Cheers, thanks for that
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Probably, oForm.Items("U_CrPrj") is not an EditText item.
You can get type of the object using VBA.TypeName function.
Something like this:
Set oItem = oForm.Items("U_CrPrj")
Debug.Print TypeName(oItem.Specific)
Result will be printed in the immediate window.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
10 | |
9 | |
5 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.