'View query a subject private sub viewaccount () 'adds an error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. glview ") set retobj = obj. accountlookup () If retobj. returnok then txtnumber. TEXT = retobj. returnobject. number ': accountid: 1003: Long: frmlookup. viewaccount' For more detailed information, visit retobj. returnobject object end if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'query specified subject private sub searchaccount (byval fnumber as string) 'add error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. gldata ") set retobj = obj. getaccount (fnumber) if not retobj is nothing then msgbox "Code:" & fnumber & "the subject has" else msgbox "code: "& fnumber &" the subject does not exist. "End if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'view query a client private sub viewcust () 'add error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. glview ") set retobj = obj. itemlookup (1) If retobj. returnok then txtnumber. TEXT = retobj. returnobject. number ': accountid: 1003: Long: frmlookup. viewaccount' For more detailed information, visit retobj. returnobject object end if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'query specified customer private sub searchcust (byval fnumber as string) 'add error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. gldata ") set retobj = obj. getitem (1, fnumber) if not retobj is nothing then msgbox "Code:" & fnumber & "the customer's" else msgbox "code is: "& fnumber &" does not exist for customers. "End if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'view query a department private sub viewdept () 'add an error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. glview ") set retobj = obj. itemlookup (2) if retobj. returnok then txtnumber. TEXT = retobj. returnobject. number ': accountid: 1003: Long: frmlookup. viewaccount' For more detailed information, visit retobj. returnobject object end if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'query specified department private sub searchdept (byval fnumber as string) 'add error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. gldata ") set retobj = obj. getitem (2, fnumber) if not retobj is nothing then msgbox "Code:" The Department of & fnumber & "has" else msgbox "code: "& fnumber &" The Department does not exist. "End if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'view query an employee's private sub viewemp () 'add an error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. glview ") set retobj = obj. itemlookup (3) if retobj. returnok then txtnumber. TEXT = retobj. returnobject. number ': accountid: 1003: Long: frmlookup. viewaccount' For more detailed information, visit retobj. returnobject object end if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'query specified employee private sub searchemp (byval fnumber as string) 'add error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. gldata ") set retobj = obj. getitem (3, fnumber) if not retobj is nothing then msgbox "Code:" & fnumber & "the employee's" else msgbox "code is: the employee of "& fnumber &" does not exist. "End if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'view query a private sub viewicitem () 'add an error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. glview ") set retobj = obj. itemlookup (4) if retobj. returnok then txtnumber. TEXT = retobj. returnobject. number ': accountid: 1003: Long: frmlookup. viewaccount' For more detailed information, visit retobj. returnobject object end if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'query specified item private sub searchicitem (byval fnumber as string) 'add error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. gldata ") set retobj = obj. getitem (4, fnumber) if not retobj is nothing then msgbox "Code:" & fnumber & "the existence of a material" else msgbox "code is: "& fnumber &" the item does not exist. "End if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'view query a repository private sub viewstock () 'add an error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. glview ") set retobj = obj. itemlookup (5) If retobj. returnok then txtnumber. TEXT = retobj. returnobject. number ': accountid: 1003: Long: frmlookup. viewaccount' For more detailed information, visit retobj. returnobject object end if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'query specified repository private sub searchstock (byval fnumber as string) 'add error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. gldata ") set retobj = obj. getitem (5, fnumber) if not retobj is nothing then msgbox "Code:" The repository of & fnumber & "has" else msgbox "code: the repository of "& fnumber &" does not exist. "End if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'view query a measurement unit private sub viewunit () 'add an error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. glview ") set retobj = obj. unitgrouplookup () If retobj. returnok then txtunitgroup. tag = retobj. returnvalue txtunitgroup = retobj. returnobject. name': m_groupname: "Inch": String: frmlookup. viewunit set retobj = obj. unitlookup (retobj. returnvalue) If retobj. returnok then txtnumber. TEXT = retobj. returnobject. number ': accountid: 1003: Long: frmlookup. viewaccount' For more detailed information, visit retobj. returnobject object end if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'query the specified measurement unit private sub searchunit (byval fnumber as string) 'Add error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. gldata ") set retobj = obj. getunit (Val (txtunitgroup. tag), fnumber) if not retobj is nothing then msgbox "measurement unit group:" & txtunitgroup & "code: the measurement unit of "& fnumber &" exists in the "else msgbox" measurement unit group: "& txtunitgroup &" code: the measurement unit of "& fnumber &" does not exist. "End if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'view query a supplier private sub viewsupply () 'add error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. glview ") set retobj = obj. itemlookup (8) If retobj. returnok then txtnumber. TEXT = retobj. returnobject. number ': accountid: 1003: Long: frmlookup. viewaccount' For more detailed information, visit retobj. returnobject object end if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'query specified supplier private sub searchsupply (byval fnumber as string) 'add error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. gldata ") set retobj = obj. getitem (8, fnumber) if not retobj is nothing then msgbox "Code:" & fnumber & "vendor" else msgbox "code: "& fnumber &" the supplier does not exist. "End if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'view query a secondary data (title) private sub viewsubmessage (byval typeid as long) 'Add error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. glview ") set retobj = obj. submeslookup (typeid) If retobj. returnok then txtnumber. TEXT = retobj. returnobject. number ': accountid: 1003: Long: frmlookup. viewaccount' For more detailed information, visit retobj. returnobject object end if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub 'query the specified auxiliary data (title) private sub searchsubmessage (byval fnumber as string, byval typeid as long) 'Add error trap on error goto herror dim OBJ as object dim retobj as object set OBJ = Createobject ("ebcglview. gldata ") set retobj = obj. getsubmes (typeid, fnumber) if not retobj is nothing then msgbox "Code:" & fnumber & "the" else msgbox "code is: "& fnumber &" does not exist. "End if set OBJ = nothing set retobj = nothing exit sub herror: msgbox err. description end sub private sub cboclass_click () If Val (mid (cboclass. text, 100) = 7 then txtunitgroup. visible = true lblunitgroup. visible = true else txtunitgroup. visible = false lblunitgroup. visible = false end if end sub private sub cmdexplore_click () Select case Val (mid (cboclass. text, 100 )) case 0 viewaccount case 1 viewcust case 2 viewdept case 3 viewemp case 4 viewicitem case 5 viewstock case 7 viewunit case 8 viewsupply case 29 viewsubmessage 29 case 35 viewsubmessage 35 case 130 case 32 end select end sub private sub partition find_click () if Len (txtnumber) = 0 Then exit sub select case Val (mid (cboclass. text, 100 )) case 0 searchaccount txtnumber case 1 searchcust txtnumber case 2 searchdept txtnumber case 3 searchemp txtnumber case 4 searchicitem txtnumber case 5 searchstock txtnumber case 7 searchunit txtnumber case 8 then txtnumber case 29 searchsubmessage txtnumber, 29 case 35 searchsubmessage txtnumber, 35 case 130 case 32 end select end sub private sub userform_initialize. additem "subject" & Space (100) & "0" cboclass. additem "customer" & Space (100) & "1" cboclass. additem "department" & Space (100) & "2" cboclass. additem "employee" & Space (100) & "3" cboclass. additem "material" & Space (100) & "4" cboclass. additem "repository" & Space (100) & "5" cboclass. additem "measurement unit" & Space (100) & "7" cboclass. additem "supplier" & Space (100) & "8" cboclass. additem "auxiliary materials (title)" & Space (100) & "29" cboclass. additem "auxiliary materials (settlement period)" & Space (100) & "35" 'if it is other materials, use a similar method, the custom accounting items and the preset accounting methods are the same as those of cboclass. listindex = 0 inittext end sub private sub inittext () text1.text = "query method of name internal code value" & vbcrlf & _ "Subject <none> ebcglview. glview. accountlookup () ebcglview. gldata. getaccount (fnumber) "& vbcrlf &" currency <N/A> ebcglview. glview. currencylookup () ebcglview. gldata. getcurrency (fnumber) "& vbcrlf & _" measurement unit <none> ebcglview. glview. unitlookup (groupid) ebcglview. gldata. getunit (, fnumber) "& vbcrlf &" measurement unit group <none> ebcglview. glview. unitgrouplookup () ebcglview. gldata. getunitgroup (fnumber) "& vbcrlf & _" Customer 1 ebcglview. glview. itemlookup (1) ebcglview. gldata. getitem (1, fnumber) "& vbcrlf &" Department 2 ebcglview. glview. itemlookup (2) ebcglview. gldata. getitem (2, fnumber) "& vbcrlf & _" Employee 3 ebcglview. glview. itemlookup (3) ebcglview. gldata. getitem (3, fnumber) "& vbcrlf &" item 4 ebcglview. glview. itemlookup (4) ebcglview. gldata. getitem (4, fnumber) "& vbcrlf & _" warehouse 5 ebcglview. glview. itemlookup (5) ebcglview. gldata. getitem (5, fnumber) "& vbcrlf & _" supplier 8 ebcglview. glview. itemlookup (8) ebcglview. gldata. getitem (8, fnumber) "& vbcrlf & _" procurement fee type 20 ebcglview. glview. submeslookup (20) ebcglview. gldata. getsubmes (20, fnumber) "& vbcrlf & _" Transport Method 21 ebcglview. glview. submeslookup (21) ebcglview. gldata. getsubmes (21, fnumber) "& vbcrlf & _" reason 22 ebcglview. glview. submeslookup (22) ebcglview. gldata. getsubmes (22, fnumber) "& vbcrlf & _" title 24 ebcglview. glview. submeslookup (24) ebcglview. gldata. getsubmes (24, fnumber) "& vbcrlf & _" industry 25 ebcglview. glview. submeslookup (25) ebcglview. gldata. getsubmes (25, fnumber) "& vbcrlf & _" Area 26 ebcglview. glview. submeslookup (26) ebcglview. gldata. getsubmes (26, fnumber) "& vbcrlf & _" payment period 28 ebcglview. glview. submeslookup (28) ebcglview. gldata. getsubmes (28, fnumber) "& vbcrlf & _" supplier category 27 ebcglview. glview. submeslookup (27) ebcglview. gldata. getsubmes (27, fnumber) "& vbcrlf & _" title 29 ebcglview. glview. submeslookup (29) ebcglview. gldata. getsubmes (29, fnumber) "& vbcrlf & _" employee category 30 ebcglview. glview. submeslookup (30) ebcglview. gldata. getsubmes (30, fnumber) "& vbcrlf & _" settlement period 35 ebcglview. glview. submeslookup (35) ebcglview. gldata. getsubmes (35, fnumber) "& vbcrlf & _" ownership 50 ebcglview. glview. submeslookup (50) ebcglview. gldata. getsubmes (50, fnumber) "& vbcrlf & _" asset relationship 51 ebcglview. glview. submeslookup (51) ebcglview. gldata. getsubmes (51, fnumber) "& vbcrlf & _" Superior Supervisor 52 ebcglview. glview. submeslookup (52) ebcglview. gldata. getsubmes (52, fnumber) "& vbcrlf & _" settlement method 130 ebcglview. glview. submeslookup (130) ebcglview. gldata. getsubmes (130, fnumber) "& vbcrlf & _" educational level 23 ebcglview. glview. submeslookup (23) ebcglview. gldata. getsubmes (23, fnumber) "& vbcrlf & _" delivery method 32 ebcglview. glview. submeslookup (32) ebcglview. gldata. getsubmes (32, fnumber) "& vbcrlf & _" Price type 245 ebcglview. glview. submeslookup (245) ebcglview. gldata. getsubmes (245, fnumber) "End sub