Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Also make sure you put the code into the load event not the init event of the form.
>The FAQ entitled: 'How do I ensure my forms are pointing to the correct tables' dated 24/06/99 provides a means for modifying the path of a database that is declared in the DE. Works great!
>
>But..I recently tried to use one of MS's canned forms (the simple one you get when use the form wizard) and the form broke when I tried to modify the database path in the manner cited above.
>
>It broke because the init of one of the form's controls (the pushbuttons) tries to access a cursor ... which hasn't been created yet since, as per the cited ref, files are not opened until the form's init fires.
>
>(...thus illustrating, among other things, the pitfalls of mucking with precanned classes...)
>
>I discovered that I could mitigate this problem by allowing the DE to automatically open the files, and instead, modify the database path of the cursor in the DE's beforeopentables event.
>
>Is this another acceptable means for achieving the same result as in the cited FAQ?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement