Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table picking up bottom record
Message
 
 
To
24/09/1999 13:04:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00268518
Message ID:
00268598
Views:
23
>Hello:
>
>Just added the goto currec in debugging, it is updating properly,
>but I still don't know why it's also updating the last record in my table???
>
>
>My code is as follows:
>If upper(allt(ThisForm.text2.value)) = upper(allt(Users.Password))
> select users
> seek(username)
> User = Users.c_id
> useview = Users.view
> useupd = Users.update
> replace users.date_in with DATE(), users.time_in with TIME(), users.date_out with { / / }, users.time_out with ""
> Thisformset.Catstoolbar1.visible = .T.
> Thisformset.frmmain.visible = .T.
> thisformset.form2.visible = .F.
>
> Else
> =messagebox("Invalid Username and Password, Try Again !"),16, "CATS")
> Return
> Endif

I would suggest you to check if SEEK is successful or not. That's the only reason why pointer go to last record or EOF - SEEK is not successful.

try this:

IF SEEK(cusername,'users','username')
wait window 'successful'+str(recno('users'))
ELSE
wait window 'not successful'+str(RECNO('users'))
ENDIF

JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Previous
Reply
Map
View

Click here to load this message in the networking platform