Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tableupdate Problem
Message
 
 
À
05/03/2002 09:55:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00628028
Message ID:
00628584
Vues:
14
Brain - this is one of those weird, gremlin situations. I recreated a new form using all the same objects, etc and everything worked fine. I even cut and pasted methods, etc. I've had this happen once or twice before. I don't know why it works but it does.
Thanks again for your help.
Ken

>Hmmm. Typically, the rowsource is from one table (lookup table) and the controlsource is from the table that you are working with. For example:
>
>I have a project that has a customers table and I am working on the customer entry screen. The customer table has fields such as name, address, city, state, zip, etc. I also have a states table that provides a lookup for the states. So, on my customer entry screen, I have a dropdown that has two columns and a rowsource of states.stateabbreviation, statename. The controlsource for this dropdown, however, is customer.state.
>
>This is typically how dropdowns are used. Please clarify how your form is setup. Perhaps, you do not need to specify the controlsource at all. Sometimes this is the case if the combobox is being used in a search capacity to position the rest of the form to the correct record.
>
>
>
>>Brian, thanks for the reply. Actually, the rowsource and the controlsource are from the same table. That's the part that didn't make sense to me. Any other thoughts?
>>Thanks again.
>>Ken Krawford
>>
>>>Ken,
>>>
>>>I am assuming that the rowsource of the combo is coming from a different table. If this is the case, everything is working as designed. When you move the record pointer in the combo, it is setting the controlsource (mytable.fieldname) to the new value. This is the same as doing a "replace mytable.fieldname with thisform.combobox.value". Since you have table buffering enabled (and probably a private data session), when you try to close the form, you get the error that tries to warn you that there are pending changes to the buffered data.
>>>
>>>You will either have to revert or commit the changes before you can safely exit. The only other option is to remove the controlsource, but that would defeat the purpose of having a picklist for mytable.fieldname.
>>>
>>>If you need further help, feel free to contact me.
>>>
>>>
>>>
>>>>I have a form with a combo box (controlsource = mytable.fieldname and rowsource = 6 (fields) that receives focus when the form opens. The only method code associated with the combo directs focus to a command button when the combo loses focus. If I move the record pointer in the combo, I get the message "Data has been changed" etc. when I close the form. My load method contains the =CURSORSETPROP('Buffering', 5, 'mytable') line. Is there something else I'm missing? Thanks!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform