new customer or supplier is not shown in Combo

hfsitumo2001

Member
Local time
Today, 15:35
Joined
Jan 17, 2021
Messages
394
Hello in my supplies issuance form, there is a button to add for new customer or supplier. when I add it, it will not be shown on the combo box, until we close the form and open it. What event procedure shall I make on the combo in order to automatically showing the new added supplier, just if I click the arrow of the combo.

Attached is the form to easily understand my problem.

Thank you.

Frank
 

Attachments

  • utofindnewaddition.jpg
    utofindnewaddition.jpg
    250.2 KB · Views: 438
Try adding something like:

Me.Combobox.Requery
 
I do not know the VBA for requery. Did you mean we click the arrow of the combo?. I did it but It still didn't show the new customer

Thanks for your enlightening me.

Frank
 
I do not know the VBA for requery. Did you mean we click the arrow of the combo?. I did it but It still didn't show the new customer

Thanks for your enlightening me.

Frank
No, you refresh the source of the combo.
 
If you add a customer, then as part of the code that adds the customer, do a Me.comboname.Requery - for EACH potentially affected combo or list box. OR you could just do a Me.Requery of the whole form. That forces re-evaluation of the recordsets.
 
Sorry George, I did receive it. But in which event should I put :
Me.Combobox.Requery

Is it on click on the combo?

Thaks
You would use the event that fires after the user is finished adding the new information, and you're about to use it in the combo. You can certainly try using the GotFocus event of the combo, but if you are using the NotInList event, that might mean the combo never loses focus.
 
You would use the event that fires after the user is finished adding the new information, and you're about to use it in the combo. You can certainly try using the GotFocus event of the combo, but if you are using the NotInList event, that might mean the combo never loses focus.
Thank you very much George, I will try it
 
You would use the event that fires after the user is finished adding the new information, and you're about to use it in the combo. You can certainly try using the GotFocus event of the combo, but if you are using the NotInList event, that might mean the combo never loses focus.
Thank you George, you are awesome. You helped me a lot, even when I was in Indonesia, now I am in California you still help me. Thank you and God bless you.

Frank
 
Thank you George, you are awesome. You helped me a lot, even when I was in Indonesia, now I am in California you still help me. Thank you and God bless you.

Frank
Hi Frank. You're very welcome. And sorry, my name is not George. It's Leo. :)
 

Users who are viewing this thread

Back
Top Bottom