Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to control WHEN a grid updates?
Message
From
31/03/2000 13:38:07
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00350331
Message ID:
00353516
Views:
16
Barbara...

I found it!!!! The problem with the "NAME" error was I guess a typographical error - that worked part time?!?!

In my EVENT combo, the RECORDSOURCE was set as follows:
DTOS(event.date)+name,eventid

When the combo was used the first time, the records were displayed beautifully in the combo. When I went
BACK to the combo, I received the error. At first I thought the problem was the field names using reserved words as we discussed. I changed those and
got the same errors. I then added the table name BEFORE the "name" in the above example and that
worked. Isn't it wierd it worked the first time without an error?


I do have a question in reference to the TABLEUPDATE and GETFLDSTATE you referred to. Because the
changes are being made in the VIEW records... I assume I need to check for the GETFLDSTATE in the
AFTERROWCOLCHANGE method??? A) is there a better way to watch for changes in the displayed records
in the grid? B) if I use the AFTERROWCOLCHANGE, is it detrimental to do the TABLEUPDATE always or
should I still check? C) the records need to be normally updated when the EVENT or BAR is changed or the
FORM closed. Could I just do the TABLEUPDATE then in the COMBOS or FORM CLOSE routines without
bothering with the GETFLDSTATE.

I should point out, that for each EVENT/BAR combination, there will be no more than 30-40 records in the grid
at any one time.

Thanks a million

Pete

p.s. Do I have to do anything special with the TABLEUPDATE to get it to update the TALLY table. I have set
the update info in the view as directed, that should be it correct?


>Why am I not surprised, Peter?
>
>>Barbara...
>>
>>This works but of course - more questions <grin>....
>>
>>- Why set the ROWSOURCE to ALIAS instead of FIELDS?
>Umm.... Because I always do?
>
>
>>- Does it matter if the BOUND TO is TRUE or FALSE? I can't seem to see any operational differences.
>
>This only matters if you have a numeric field. Then you'd set it to TRUE. It's explained in the help. Try it with a small combo with both numeric and character data.
>
>>- You said set the CONTROL SOURCE to TALLY.EVENTID... I don't have TALLY in the DE. Only: EVENT,
>>BAR & VEVENTBAR (the view of the tally file). When I set the CONTROL SOURCE to anything, I get erratic
>>behavior. The COMBO doesn't sort right, when I pick the records it picks a different record, etc. If I leave it blank
>>it works EXCEPT (there always has to be one of those)... I can pick the event, pick the bar, and the requery in
>>the interactive changes displays the records in the view. I can click in the view, no problem. I can also change
>>the bar, again, no problem. BUT, if I click on the EVENT, I get an error VARIABLE "NAME" IS NOT FOUND.
>>This is a never ending repeating error. I have to END TASK vfp to get out of it. I tried running the debugger, but
>>it doesn't show me where this is coming from.
>
>OK, I made the erroneous assumption that the data was linked to a single table record. No, you don't need to have Control Source set to anything, it can be blank. It sounds like there's some code in your EVENT combo that's running during updates. Have you tried deleting it and rebuilding it using the BAR combo as a model? Walk through the code with the debugger to see exactly where it is failing.
>
>Barbara
Peter Brama
West Pointe Enterprises

VFP is getting easier but STILL alot to learn!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform