hiya all
I have been trying to flick through the info about this but find it all a bit overwhelming,I have used the following code, the row in grid1 (the main order) selected by the user is highlighted and the query (order lines) is performed and display in grid2. I am getting the following message each time a row is highlighted:
"Expression is invalid.Use a valid expression for DYNAMICBACKCOLOUR and DYNAMICFORECOLOUR properties"
All this is on the click event of grid1.column1.text1:
LOCAL isCurrent
isCurrent = thisform.grid1.column1.text1.value
SELECT all_orders
GO TOP
*!* LOCATE FOR all_orders.wo = isCurrent
with thisform.Grid1
.SetAll([DynamicBackColor],"IIF(all_orders.wo == isCurrent,RGB(0,0,128),RGB(255,255,255))",[Column])
.SetAll([DynamicForeColor],"IIF(all_orders.wo == isCurrent,RGB(255,255,255),RGB(0,0,0))",[Column])
.Refresh()
endwith
thisform.grid2.recordsource = "dummy_clients"
select order_line.orderline_no, ;
order_line.description, ;
order_line.pointnos, ;
order_line.rail_section, ;
order_line.qty, ;
order_line.status ;
from order_line ;
where order_line.wo == isCurrent ;
order by order_line.orderline_no ;
into cursor query_items
thisform.grid1.REFRESH()
thisform.grid2.recordsource = "query_items"
Any advice??
I have been trying to flick through the info about this but find it all a bit overwhelming,I have used the following code, the row in grid1 (the main order) selected by the user is highlighted and the query (order lines) is performed and display in grid2. I am getting the following message each time a row is highlighted:
"Expression is invalid.Use a valid expression for DYNAMICBACKCOLOUR and DYNAMICFORECOLOUR properties"
All this is on the click event of grid1.column1.text1:
LOCAL isCurrent
isCurrent = thisform.grid1.column1.text1.value
SELECT all_orders
GO TOP
*!* LOCATE FOR all_orders.wo = isCurrent
with thisform.Grid1
.SetAll([DynamicBackColor],"IIF(all_orders.wo == isCurrent,RGB(0,0,128),RGB(255,255,255))",[Column])
.SetAll([DynamicForeColor],"IIF(all_orders.wo == isCurrent,RGB(255,255,255),RGB(0,0,0))",[Column])
.Refresh()
endwith
thisform.grid2.recordsource = "dummy_clients"
select order_line.orderline_no, ;
order_line.description, ;
order_line.pointnos, ;
order_line.rail_section, ;
order_line.qty, ;
order_line.status ;
from order_line ;
where order_line.wo == isCurrent ;
order by order_line.orderline_no ;
into cursor query_items
thisform.grid1.REFRESH()
thisform.grid2.recordsource = "query_items"
Any advice??