GUIDO22
Registered User.
- Local time
- Today, 11:49
- Joined
- Nov 2, 2003
- Messages
- 515
Hi
I am looking to run a query on selection / keyed entry of a numerical value in a combo dropdown.
The query returns a small recordset to the VB code that is analysed for a flag value. This value determines the value of a check box on the form.
(for those interested : .....The form is a PrintInvoice form - the dropdown is for the specific invoice number, when this has been entered I need to determine if the client has pre-paid for all the orders against this invoice in which case a 'PrePayment' check box is set to True. This displays the appropriate notification on the invoice when the form is printed).
The problem I am having is where to call this code from?
If I use the Dropdown Lostfocus() or Exit() events - the code runs when the form is loaded and when the form closes..... and if I use the Change() event, each keypress in this field causes the event to fire...
Is there a cleaner way to do this or will I have to use form load flags to determine if the form is either loading or closing to avoid the recordset retrieval code from being run?
Thanks in advance for any help.
Regards
G

I am looking to run a query on selection / keyed entry of a numerical value in a combo dropdown.
The query returns a small recordset to the VB code that is analysed for a flag value. This value determines the value of a check box on the form.
(for those interested : .....The form is a PrintInvoice form - the dropdown is for the specific invoice number, when this has been entered I need to determine if the client has pre-paid for all the orders against this invoice in which case a 'PrePayment' check box is set to True. This displays the appropriate notification on the invoice when the form is printed).
The problem I am having is where to call this code from?
If I use the Dropdown Lostfocus() or Exit() events - the code runs when the form is loaded and when the form closes..... and if I use the Change() event, each keypress in this field causes the event to fire...
Is there a cleaner way to do this or will I have to use form load flags to determine if the form is either loading or closing to avoid the recordset retrieval code from being run?
Thanks in advance for any help.
Regards
G
