cancel
Showing results for 
Search instead for 
Did you mean: 

Item Properties Checked or unchecked

Former Member
0 Kudos

Hello All,

When I check on an item property it is suppose to go in the OITM.QryGroup1 but when I Debug Information there is no table to reference. Can anyone help me get that Yes or No value?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I am not sure if I undestand your question? are you querying the database in the middle of an item event ? if so what and when? please give more details.

Former Member
0 Kudos

I am tring to list all itemcodes that have property A check off in the Item Master.

Former Member
0 Kudos

SELECT T0.ItemCode, T0.ItemName, T0.QryGroup1 FROM OITM T0 WHERE T0.QryGroup1 = 'N'

HTH

Juha

Former Member
0 Kudos

Hello Juha,

The problem I am having is that I first need to get the property number from OITG. Then I what to use that number to call the QryGroup(). I tried to put this field into a string variable but that does work. Can you help?

    
rq.DoQuery "SELECT OITG.ItmsTypCod FROM OITG WHERE OITG.ItmsGrpNam = '" & txtItem.String & "'"
   Dim i As Integer
   i = rq.Fields(0).Value
   Dim pro As String
   pro = "OITM.QryGroup" & i
rr.DoQuery "SELECT OITM.ItemCode, OITM.ItemName FROM OITM WHERE '" & pro & "' = 'Y'"
   Do While Not rr.EOF
   Item = rr.Fields(0).Value

AlexGrebennikov
Active Contributor
0 Kudos

Hi Laura

try taht way:

rq.DoQuery "SELECT OITG.ItmsTypCod FROM OITG WHERE OITG.ItmsGrpNam = <b>N</b>'" & txtItem.String & "'"
   Dim i As Integer
   i = rq.Fields(0).Value
   Dim pro As String
   pro = "OITM.QryGroup" & i
rr.DoQuery "SELECT OITM.ItemCode, OITM.ItemName FROM OITM WHERE " & pro & " = 'Y'"
   Do While Not rr.EOF
   Item = rr.Fields(0).Value

in 2nd query u shild kill <b>'</b>-simbols

Answers (0)