Tray and Richard If, what I type in the combo box does not exist in the table, it always returns BLANK i.e. wintemp.pcode is empty
Thyere is another combox on the same form and its working fine there. The only difference is that field is numeric On Thu, Oct 2, 2014 at 11:37 AM, Richard Kaye <[email protected]> wrote: > As long as we're refactoring... > > IF NOT INDEXSEEK(wintemp.pcode,.f.,[winpcodes],[index tag/name which is > not in your snippet]) > trt=MESSAGEBOX(ALLTRIM(mPcode)+' does not exist in the analysis > table. Do you want to ADD this?',4+32,'Good idea') > IF trt=6 > INSERT INTO winpcodes (code) VALUES (mPcode) > ENDIF > ENDIF > -- > > rk > -----Original Message----- > From: ProfoxTech [mailto:[email protected]] On Behalf Of Tracy > Pearson > Sent: Wednesday, October 01, 2014 6:31 PM > To: [email protected] > Subject: RE: Combo > > Sytze de Boer wrote on 2014-10-01: > > I have a combo box > > Controlsource=wintemp.pcode (temporary table) > > Rowsource=winpcodes (free standing table) > > Rowsourcetype=2 - alias > > BoundTo=.t. > > > > In the valid event, i have > > > > mPcode=wintemp.pcode > > > > SELECT winpcodes > > SEEK mpcodes > > IF !FOUND() > > trt=MESSAGEBOX(ALLTRIM(mPcode)+' does not exist in the analysis > > table. Do you want to ADD this?',4+32,'Good idea') IF trt=6 > > APPEND BLANK > > REPLACE code WITH mPcode > > ENDIF > > endif > > sele wintemp > > > > My problem is > > If mPcode is not found in the winpcodes table, it places a BLANK item > > in the winpcodes file > > > > It seems not to matter if BoundTo is True or False > > > > Any ideas anyone? > > > > Sytze, > > Why not use an Insert command instead of the Append/Replace? > Since the table is attached to a control, the row may or may not be moving > to the appending record. > > Tracy Pearson > PowerChurch Software > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAG1nNy-Uz-pzobwVHA4YKLppgMy+=fhjvewjaeg0oraw0ny...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

