cancel
Showing results for 
Search instead for 
Did you mean: 

Error in combo

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

pedro_magueija
Active Contributor
0 Kudos

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