| Subject |
Re: spinbox |
| From |
charlie <tm@tc.com> |
| Date |
Wed, 19 May 2021 08:34:55 -0400 |
| Newsgroups |
dbase.getting-started |
OK got it... Entryfield was set to integer instead of character. Works now.....
Charlie Wrote:
> More info on my problem. I have changed back to an entryfield instead of spinbox. I am now only trying this
>
> a = form.auctopen1.rowset
> m = form.master1.rowset
> cEbay = form.entryfield1.value
>
> //if cEbay >= 100000000000
> a.findkey(cEbay)
>
> If I am trying to find a value less than 12 characters the pointer goes directly to that row. if I try a 12 character it goes to the end og the file thus for the reason the lesser works, I don't think the decimals it is showing in the test messagebox matter. In the entryfield I am using a picture with 12 9s. I've also tried 13. I am trying to revise old code so that I can only allow 12 characters for the entryfield and make sure they are not duplicates for the auctopen field. There has to be a reason it can't find 12 character rows!!
>
>
>
> Charlie Wrote:
>
> > I am having problems withe the following code:
> >
> > function PUSHBUTTON1_onClick()
> > a = form.auctopen1.rowset
> > m = form.master1.rowset
> > cEbay = form.spinbox1.value
> > if lennum(form.spinbox1.value) > 11
> > a.findkey(cEbay)
> > msgbox( ""+cEbay )
> > if not a.findkey(cEbay)
> > //a.first()
> > msgbox( "success" )//do stuff
> > else
> > msgbox( "Failed entry! "+cEbay+ " is a duplication." )
> > return
> > endif
> > else
> > msgbox( "Failed entry! "+form.spinbox1.value+" entry must have 12 digits in Ebay number." )
> > return
> > endif
> >
> > I don't think I have ever done a findkey on a numeric field before. Seems like it comes back with decimals. I am trying to force idno to not duplicate. The problem is this isn't working correctly. Seems to force decimals where the field doesn't allow decimals. Is there a secret to findkey using numbers? The code isn't finished yet. I just want to get past this before giving it finishing touches. Thanks for any help.
>
|
|