on 09-22-2005 10:22 AM
Hi,
I have a combobox on my user defined form.
I want to poputate month names in it when it opens up.
How can i do that?
Thanks.
Satish.
on the form load event:
Dim ocmbo As SAPbouiCOM.ComboBox
ocmbo = SBO_App.Forms.Item(FormUID).Items.Item("YourComboID").Specific
ocmbo.ValidValues.Add("1", "January")
ocmbo.ValidValues.Add("2", "February")
etc...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think that this cannot be done in the form load event.
So i solved this problem in the menu event.
When my user defined menu is clicked, i first load my form and then populate the combobox.
I have a little different question.I want to use a user data source to populate this combo box with month names.
How can i do that.Can you provide a sample.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In VB there is a locals window where you can see objects and there properties.
The object "frm" which is my form does not show any item(that is my combo box, matrix ok button and cancel button)
It seems like during form load, combo box, matrix and other items are not yet added to form.
Are you able to set the combo box values during form load of your user defined form?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am using VB6.
And after these lines
If pVal.EventType = et_FORM_LOAD And pVal.Before_Action = False Then
Set frm = applic.Forms.Item(FormUID)
when i see the local window, there are no items listed under object frm.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes i am passing the correct UID(case sensitive) for the combobox which is "U_CbMt".
This userdefined field is on my form and is not deriving values from any table.
I am trying to populate the combobox in my user defined form load event.
I think(correct me if i am wrong) that during form load, the items are not created on the form yet.That is why it cannot find my item.
If this is true, how else can i populate my combobox?
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Satich, do you really can get access to frm.Items.Item("U_CbMt").Specific.ValidValues-property?!
what development language are you usin'?
try that lines:
If pVal.EventType = et_FORM_LOAD And pVal.Before_Action = False Then
Set frm = applic.Forms.Item(FormUID)
Set <b>oCombo</b> = frm.Items.Item("U_CbMt").Specific
<b>oCombo</b>.ValidValues.Add "Jan", "January"
where oCombo is SAPbouiCOM.ComboBox
Hi Barend,
I do the following :
If pVal.EventType = et_FORM_LOAD And pVal.Before_Action = False Then
Set frm = applic.Forms.Item(FormUID)
frm.Items.Item("U_CbMt").Specific.ValidValues.Add "Jan", "January"
End If
It gives me an error saying Invalid Item.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Satish,
Does "U_CbMt" mean that you are specifying VVs for a UDF? If yes, the why not specify them in the Tools / User-Defined Fields / etc...?
Also, if the UDF item resides with other UDFs on a 'UDF form '( accessible through shiftctrl-U), then you should use -frm.Type as form type to get the UDF-form.
HTH
Juha
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
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.