By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,037 Members | 1,839 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,037 IT Pros & Developers. It's quick & easy.

Updating a table from a ComboBox

P: 2
Hi,

I'm new to using databases so this is probably really simple and has been covered in the forum already but I can't find it.

What I am trying to do is:-

If I update a combo box with a new Asset which isn't defined in the linked Asset table. I would like it to update the linked table but only if I have a check box (new asset?) ticked.

There may be better ways to do this too but as I'm new to this I'm just not sure.

Any help is appreciated.

Thanks

N
Dec 14 '11 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 446
Hi
I'm a bit stuck on how you can have a checkbox for a new asset if it has not been added yet?

We would need more info about your tables to help more fully but I think what you need to search for actions that can be taken after the 'Not in List' event has been fired.

S7
Dec 14 '11 #2

P: 2
Hi S7,

Thanks for your swift response. I didn't really explain my issue very well did I?

I have an asset list that in a table called "AssetType" and in my form I have a lookup ComboBox looking in that table for the dropdown results. Now if we get a new asset type and have to enter this into the field how can I have the "AssetType" table to be updated with the new asset type and to be included in the drop down box next time the form is used?

I hope I've explained myself a little bit better.

Thanks for your help

N
Dec 14 '11 #3

NeoPa
Expert Mod 15k+
P: 31,494
Normally such maintenance is carried out in a separate form, dedicated to the table which contains the data used to populate the ComboBox control. There is much to be said for this approach as it is tidy and logical.

However, if you consciously choose the approach outlined, then you can use the NotInList event of the ComboBox (as S7 was suggesting) to run code to append the data to the table then call a .Requery of the ComboBox to reflect the new data.
Dec 14 '11 #4

Post your reply

Sign in to post your reply or Sign up for a free account.