Dick, There is a simpler, more elegant way to do what you want.
1. Make sure your "enhanced grid" has a component ID assigned to it 2. Make sure under Enhanced Options for the grid, "Show Filter Bar" is checked and on the bottom part select "Contains" for Filter Type On the calling code define the initial condition you want, in my case I want to display equipment with status In Use or code "IU" SET VAR vEquipStatus TEXT = 'IU' On the form After Start EEP add the command: PROPERTY vci_EquipGrid FILTERS->COLUMN_NAME->equip_status .vEquipStatus In my case vci_EquipGrid is the Grid Component ID equip_status is the column in the grid with the equipment status that will be set to "IU" Now, when you start the form, the grid will display items only for equip_status "IU" as shown in the filter bar and you can change it to any other status by typing the new by typing over the currently define status code. Very powerful. You can also create buttons with pre-defined selections or to clear the condition and display all the records. To clear the condition: PROPERTY vci_EquipGrid FILTERS->COLUMN_NAME->equip_status->CLEAR_ITEMS TRUE RETURN To select all equipment with status Surplus sold "SS" PROPERTY vci_EquipGrid FILTERS->COLUMN_NAME->equip_status 'SS' RETURN You get the idea... This approach gives you absolute and instantaneous flexibly without having to open and close tables. It also allows you to enter a search criteria for any of the displayed grid columns; you can enter criteria for one or more columns. In the past I used the temporary table with the close and re-open table approach; in fact, I did a presentation at the 2004 conference ( nine years ago) on this approach, but now, with the introduction of enhanced grids, I have done away with it. The approach above requires a lot less code and is a lot more powerful. I love enhanced grids as they do most of the work for you. Let me know if you have any questions and will be happy to guide you through the procedure Javier, Javier Valencia, PE O: 913-829-0888 H: 913-397-9605 C: 913-915-3137 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Dick Fey Sent: Friday, October 25, 2013 2:45 PM To: RBASE-L Mailing List Subject: [RBASE-L] - RE: Changing DB Grid results within a form AWESOME ! Thanks so much. I love this list Dick Fey Carpet Broker Inc. On 10/25/2013 2:17 PM, MikeB wrote: > Using a single table view (make that a temporary view that is defined > in both the onbefore start and the on before design EEPs) > > > Then instead of a table refresh, in whatever button you would press to > refresh it, do this: > > PROPERTY table tvwTemporaryView 'CLOSE' > DROP VIEW tvwTemporaryView > CREATE TEMP VIEW tvwTemporaryView AS SELECT * FROM WhateverTable + > WHERE (WhatEverColumn = .vWhatEverVariable) > PROPERTY table tvwTemporaryView 'OPEN' > > I use this all the time. No Probs. > > > > >> -----Original Message----- >> From: [email protected] [mailto:[email protected]] On Behalf Of Dick >> Fey >> Sent: Friday, October 25, 2013 2:36 PM >> To: RBASE-L Mailing List >> Subject: [RBASE-L] - Changing DB Grid results within a form >> >> Still unable to find success, tried both suggestions to no avail. >> Tried using a view, and enclosing the var in () Jump in if you are >> doing this with success. >> >> Dick Fey >> Carpet Broker Inc. >> >> >> >> >> Can't decide if my brain is fried, or this just won't work. >> >> I want to edit a table using a DB Grid, in a form, using a variable >> to define the results shown >> >> Like; >> >> Set var vcode Text = 'SHAW' >> Edit using mfglist where mfg contains .vcode >> >> >> Then in the form, change the value of vcode, and do a property table >> refresh.. and get a new set of results. >> >> Does not work. Can it work ? What am I doing wrong? >> >> Dick Fey >> Carpet Broker Inc. >> >> --- RBASE-L >> ================================================ >> TO POST A MESSAGE TO ALL MEMBERS: >> Send a plain text email to [email protected] >> >> (Don't use any of these words as your Subject: >> INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH, REMOVE, SUSPEND, RESUME, >> DIGEST, RESEND, HELP) >> ================================================ >> TO SEE MESSAGE POSTING GUIDELINES: >> Send a plain text email to [email protected] In the message SUBJECT, >> put just one word: INTRO >> ================================================ >> TO UNSUBSCRIBE: >> Send a plain text email to [email protected] In the message SUBJECT, >> put just one word: UNSUBSCRIBE >> ================================================ >> TO SEARCH ARCHIVES: >> Send a plain text email to [email protected] In the message SUBJECT, >> put just one word: SEARCH-n (where n is the number of days). In the >> message body, place any text to search for. >> ================================================ > > >

