Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Combobox.Valid() timing
To All
Two questions (application here means a paper form):
A PERSON is filling out an APPLICATION. On the display form is a combobox bound to an application.code field, with an SQL out of a lookup table row source. The selection replaces the application.code with a "type of application" code from the lookup, all ok.
This application.code is a foreign key into a table of application types. Each application type has a certain fee. I need to copy the then current fee for that type of application to the application.fee field in the record that I am building to preserve the then current fee.
Once I have established the application and the type of application I use a GO RECNO() to refresh a pointer from this application into a table of old applications of the same type. (this person may have submitted similar applications in the past) and then to refresh a grid displaying these old applications, if any.
I am assuming that the bound column from the combo updates the control source with the value.
In the Valid() of the combobox I want to replace the application.fee with the fee from the apptypes.fee
REPLACE APPLICATION.fee WITH APPTYPES.fee
Then I SELECT APPLICATION and GO RECNO() to reassert pointers down into the grid if old applications of that same type. (part of the pointer is the application type selected from the combo)
then a THISFORM.refresh()
Question 1 is, at what point has the bound column replaced the control source field with its value. Has that happened by the time I get to the Valid for the combo such that my new pointer is in place in time for the GO RECNO()? It appears to work, but I am not sure.
Question 2 is, if the code is 023 how do I let the user type in values and pad them left with 0 to type ahead into the combo? Where would I put the code? Or would I have to use a grid?
Thank you,
Al Allison
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