hugomadail
Registered User.
- Local time
- Today, 04:53
- Joined
- Aug 31, 2018
- Messages
- 25
Hello, I have a issue with a combobox in my BD, Ill explain below (and I hope to explain it well):
- I have a form "frmproducts" from "tblproducts" - fields ProductID, ProductName, Store.
- field Store is a combobox that shows the contents of tblStore (it shows StoreName but links with StoreID)
I have a button next to combobox that works like: If combobox Store is null, open "frmaddstore" with newrecord. If combobox has Store inserted, it open "frmaddstore" and goes to current record for edit purposes.
All worked fine, but Store combobox could be left empty so I changed Store to a required field for not having products unrelated with stores.
Now it doesnt let me go out of frmproducts or go to new record without assigning a store on Store combobox, shows an error message, just as wanted.
BUT this error message also shows on Store combobox after I type something and doesnt let me do anything before assigning a Store on combobox.
My idea is to seach in combobox for the Store, and I want to type text to speed seach (ex: type mech on combobox to find mechatech faster) BUT if I dont find the store (not exist yet on BD), even if I empty all text on combobox it doesnt let me use the button to add a new store and shows the error message "must have value in field Store".
I'm like Yeah I know that dear error but I need to add store first. If I press ESC after typing on combobox it kinda resets and let me do it, but I would like it to reset without pressing esc.
How can I solve this problem ? I hope you can help
- I have a form "frmproducts" from "tblproducts" - fields ProductID, ProductName, Store.
- field Store is a combobox that shows the contents of tblStore (it shows StoreName but links with StoreID)
I have a button next to combobox that works like: If combobox Store is null, open "frmaddstore" with newrecord. If combobox has Store inserted, it open "frmaddstore" and goes to current record for edit purposes.
All worked fine, but Store combobox could be left empty so I changed Store to a required field for not having products unrelated with stores.
Now it doesnt let me go out of frmproducts or go to new record without assigning a store on Store combobox, shows an error message, just as wanted.
BUT this error message also shows on Store combobox after I type something and doesnt let me do anything before assigning a Store on combobox.
My idea is to seach in combobox for the Store, and I want to type text to speed seach (ex: type mech on combobox to find mechatech faster) BUT if I dont find the store (not exist yet on BD), even if I empty all text on combobox it doesnt let me use the button to add a new store and shows the error message "must have value in field Store".
I'm like Yeah I know that dear error but I need to add store first. If I press ESC after typing on combobox it kinda resets and let me do it, but I would like it to reset without pressing esc.
How can I solve this problem ? I hope you can help