on 01-08-2008 7:37 AM
hi alll
when i click on my own creating form the above error is showing......?????
Private Sub drawform()
Dim oitem As SAPbouiCOM.Item
Dim oCombopptype As SAPbouiCOM.ComboBox
Try
LoadFromXML("PayPeriodMaster.srf")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
oform = SBO_Application.Forms.Item("MPPeriod")
''''''' combo for code
oitem = oform.Items.Item("txtcode")
oCodetext = oitem.Specific
'AddpayCodeCombo(cmbcode)
'''''''''combo for pay type
oitem = oform.Items.Item("cmbppt")
oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Employee")
oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Labour")
oCombopptype = oitem.Specific
''''''' notes''''''''''''
oitem = oform.Items.Item("txtNotes")
noteedittext = oitem.Specific
'''''''' startdate
oitem = oform.Items.Item("txtSDate")
starD = oitem.Specific
''''''''''end date
oitem = oform.Items.Item("txtEDate")
endD = oitem.Specific
''''''''''days in period
oitem = oform.Items.Item("txtDPrd")
daystext = oitem.Specific
'''''''''''' working days
oitem = oform.Items.Item("txtWDays")
worktext = oitem.Specific
End Sub
could u help me any body......
hi
i think that error is not because of the code you have pasted here.
it seems like there are some sql queries in your code.
Please check them in Query analyzer with some test values.
if this queries are running properly then the problem might be at concatenating the values (while building the query)
and there are some problems in your code too i.e
HERE
oitem = oform.Items.Item("cmbppt")
oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Employee")
oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Labour")
oCombopptype = oitem.Specific
IT SHOULD BE LIKE THIS
oitem = oform.Items.Item("cmbppt")
oCombopptype = oitem.Specific
//Valid values should be different
oCombopptype.ValidValues.Add(CStr(SAPbouiCOM.BoStatusBarMessageType.smt_Success), "Employee")
oCombopptype.ValidValues.Add(CStr(4), "Labour")-- GIVE Different valid value
Hope it helps you
Regards
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.