Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh only works the second time
Message
De
17/11/1997 14:23:24
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Refresh only works the second time
Divers
Thread ID:
00060734
Message ID:
00060734
Vues:
61
I have an interesting dilemma that I can't quite peg down. I have a grid on a pageframe that is bound to a view. (The grid is a list of members who are registered for a convention). The view is called 'members_for_convention' and is just a list of names from an intersection table between two tables: member, and convention, whose WHERE clause specifies only records for the selected event (convention).

The problem is, when cancelling a member from the convention, the grid only refreshes to show the changes after requerying twice. Here is the code behind the cancel button and the called method:

cancelbutton.click:
_____________________________________
answer=MESSAGEBOX("Are you sure you want to cancel " + alltrim(memb.fname) + " " + alltrim(memb.lname) + " from the convention?",48+0+1,"Delete")
if answer = 1 then
if seek(members_for_convention.membconvnum, 'membconv','membconvnu')
delete in membconv
endif
if memb.reason = "CONVENTION" then
delete in memb
endif
thisform.refreshpage4
thisform.refreshpage4 && Adding this line was the only way to get it to work
endif
_____________________________________
method: refreshpage4
m.convnum = convention.convnum
requery('members_for_convention')

seek members_for_convention.membconvnum in membconv order membconvnu
seek members_for_convention.mmembnum in memb order membnum
thisform.refresh

I have implemented many forms like this, and never had this happen. What could be different the second time that the method runs that would cause the grid to finally refresh?
Erik Moore
Clientelligence
Répondre
Fil
Voir

Click here to load this message in the networking platform