Skip to Content
author's profile photo Former Member
Former Member

Error in combo

Try

If pVal.ItemUID = "1000002" Then

Dim code As String

oCombo = oForm.Items.Item("1000002").Specific

code = oCombo.Selected.Value

objRS = objAddOn.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

'strSQL = "Select b.Series,b.seriesname,b.remark from ousr a inner join nnm1 b on a.fax = b.remark where a.user_code = '" & uname & "' and b.objectcode = 'SST_INSHDR'"

strSQL = "select (count(a.U_attend) - sum(b.U_workingdays)),a.U_empcode from [@SST_EI_ATRDTL] a inner join [@SST_EI_PSLP] b on a.U_empcode = b.U_empcode "

strSQL = strSQL + " b.where U_empcode ='" & code & "'"

objRS.DoQuery(strSQL)

While Not objRS.EoF

oForm.Items.Item("8").Specific.string = objRS.Fields.Item(0).Value

objRS.MoveNext()

End While

End If

Catch ex As Exception

End Try

is this codings is correct for displaying from combo selection

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Aug 18, 2012 at 09:55 AM

    Hi Jeyabalan,

    I think it works, although the string for item("8") is alwas overwritten if more then 1 result is returned. Which means you'll only get the last returned value on that item.

    Do you have a problem with it?

    Best regards,

    Pedro Magueija

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 19, 2012 at 08:54 PM

    Hi Jeybalan,

    You can try this :

    oForm.Items.Item("8").Specific.Value = objRS.Fields.Item(0).Value ;

    You have to write .Value on left hand manually , and i think it should work .

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.