473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Updating a table from a ComboBox

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
3 1473
sierra7
446 Expert 256MB
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
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
32,556 Expert Mod 16PB
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

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

Similar topics

0
by: Dan Jones | last post by:
I have a database of books that was originally created as a flat file. Each record has a number of fields, including the authors name. I'm trying to convert the database to something a little more...
7
by: Dimitri Furman | last post by:
What would be the correct syntax, if any, that allows updating a table variable in a statement that uses the same table variable in a correlated subquery? Here's an example: DECLARE @t table (N1...
3
by: Steve Housechild | last post by:
I have a table of 'Customers', a table of 'Newsletters' and a table for storing which customers have recieved which letters 'CustLett'. By using a query, I have pulled a list of customers who...
6
by: cyoung311 | last post by:
I'm trying to do an automatic update of one table from another through a form. Basically, when a selection is made for an item, in this case a particular workshop, I want to get the associated...
8
by: Zest4Csharp | last post by:
hi, I have a database table without a key field. I managed to view the contents of the table through a DataSet in a DataGrid in C#. The user can edit the data in the grid. Can someone show me how...
2
by: sean.gilbertson | last post by:
Hi, I have a user-defined function which returns a table (call it '@a'), and has another table defined as a variable (call it '@b'). When I try to do the following query, I get "Must declare...
5
by: aaron.m.johnson | last post by:
I have an application which contains an Access database with linked tables that point to another database within the application. The problem I have is that when the user installs the application,...
2
by: ConfusedMay | last post by:
Hi, Could someone help me with updating my table? I'm using access 97. I have a table that have # of tests and test reasons called testing. what I need is if there's any job with test reason...
4
by: AlexNunley | last post by:
I've adopted a moderately sized (65k records) active use database (Access 2000, Windows XP). One of the most commonly used forms is whats called the RMA generation field, used to add claim...
4
by: Light1 | last post by:
I am working in Access 2003. I have a form that pulls information from a couple of tables. When the user chooses a selection from the dropdown menu of a combo box, it is putting that information...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.