Charles, You are using DISTINCT and ORDER BY together. The ORDER BY is not needed as DISTINCT will order the results.
And CTXT is not needed as the source column is text. Actually, in most cases, Any type field can be retrieved as the choose will convert to text without help. I just wonder if the word Choose in the caption is comfusing the parser. Dennis McGrath --- Charles Parks <[EMAIL PROTECTED]> wrote: > This is currently how I have the code: > > SET WALKMENU ON > CHOOSE vsub FROM #VALUES + > FOR DISTINCT (CTXT(publisher)) + > FROM ccPublishers + > ORDER BY Publisher + > TITLE 'Press [Esc] to Return to Menu' + > CAPTION 'Choose Publisher' LINES 20 > > Publisher is text 40. > > Still, it seems to not be working. > > -----Original Message----- > From: Troy Sosamon [mailto:[EMAIL PROTECTED] > Posted At: Friday, September 26, 2003 8:41 AM > Posted To: RB6-L > Conversation: [RBASE-L] - Re: Choose syntax > Subject: [RBASE-L] - Re: Choose syntax > > > The field you are choosing needs to be text or else embed it in the > ctxt > function: > (ctxt(someIntField)) > > Troy > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of > Charles > Parks > Sent: Friday, September 26, 2003 7:32 AM > To: RBASE-L Mailing List > Subject: [RBASE-L] - Re: Choose syntax > > > The error actually seems to be table specific. > > I tried this choose on another table in the same database and it > worked > fine. > > What would be a good way to find out why it is not working on one > table but > works on another? > > -----Original Message----- > From: Dennis McGrath [mailto:[EMAIL PROTECTED] > Posted At: Friday, September 26, 2003 8:15 AM > Posted To: RB6-L > Conversation: [RBASE-L] - Re: Choose syntax > Subject: [RBASE-L] - Re: Choose syntax > > > Does it only fail in trace mode? Or does it always fail? > > Try RStyle on the code to see it it can tell you what is wrong with > the > structure of your code. The choose command looks ok to me. > > If nothing else helps try > > SET VAR vQ = '''' > SET VAR vTmp = ('Press' & .vQ + ('[Esc]') + .vQ & 'to Return to > Menu') > > CHOOSE vsub + > FROM #VALUES + > FOR publisher + > FROM publishers + > ORDER BY publisher + > TITLE .vTmp + > CAPTION 'Choose Publisher' + > LINES 20 > > > Dennis McGrath > > --- Charles Parks <[EMAIL PROTECTED]> wrote: > > Is the following the correct syntax for a choose statement? > > > > CHOOSE vsub + > > FROM #VALUES + > > FOR publisher + > > FROM publishers + > > ORDER BY publisher + > > TITLE 'Press ''[Esc]'' to Return to Menu' + > > CAPTION 'Choose Publisher' + > > LINES 20 > > > > For some reason when I am in trace mode and execute this command it > > gives an error message about Endwhile. I have recently rebuilt my > > database and it still gives that error. > > > > What am I doing wrong? > > > > Thanks, > > Charlie > > >

