Main Board > Programming

Assign a query to a cell at run time.

(1/1)

dlocke:
Hi

Can you assign a query to a cell at run time ?
I see a "query" property in the manual but I can an error 88 trying to access it.

Don Locke.

Mike King:
Technically the Query property doesn't exist (at least in Nomads -- in iNomads there is a property called CellQuery$ which you can alter dynamically).  What Nomads does is maintain internal tables relative to the grid column/row with the query setting.

There really isn't a way to dynamically change this table but what we would suggest is assign a query that runs a program and in that program you can decide which actual query you want to run and should your logic decide there isn't a query, display an error message.

Jane Raymond:
One thing I have done at run time is programmatically assign a 'celltype$ (such as Lookup, LookupHideBtn, Query, QueryHideBtn) to a grid cell. Then in the cell logic you can test for _EOM$=$FF$ to determine if the query or lookup button has been pressed and then do logic to invoke the query.

dlocke:
Thanks,
I have created the query in the presets and updated the code with work with it.

Don. 

Navigation

[0] Message Index

Go to full version