473,385 Members | 1,521 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,385 software developers and data experts.

Update table through form

17
Hello again

After getting great help perfecting my little Access 2007 movies database, I've stumbled upon an inconvenience. In my opinion it seems basic, but still I'm not able to solve it. As an example, in my form I have two fields (Production & Distribution). These are linked to 1 table (Companies). Now each time I want to enter a new company, I have to do so manually in the table. What I would like is to be able to enter the new name in the form and that the table gets updated instantly. I think the correct term is populated.

Data Properties of the 2 Combo Boxes Production & Distribution:

Control Source: Production & Distribution
Row Source: Companies
Row Source Type: Table/Query
Bound Column: 1
Limit To List: Yes
Allow Value List Edits: Yes
List Items Edit Form:
Inherit Value List: Yes
Show Only Row Source: No
Input Mask:
Default Value:
Validation Rule:
Validation Text:
Enabled: Yes
Locked: No
Auto Expand: Yes
Smart Tags:

When I go to the main table (Movies) where all the boxes are listed and I look at the Field Properties of the boxes Production and Distribution it says at the row source:
Expand|Select|Wrap|Line Numbers
  1. SELECT [Companies].[Companies] FROM Companies; 
Looking for solutions on the internet, I couldn't figure out how to get them to work. For instance the 'INSERT INTO' command, looking at the relationships (one-to-many / many-to-many), bound or unbound (all appear to be bound), ... I tried everything using a newly copied database each time but nothing seems to work.

So yet again I'm here to ask for your help. I hope the information I gave is enough and clear.

Greetings Margie
Feb 2 '08 #1
2 2540
puppydogbuddy
1,923 Expert 1GB
Hello again

After getting great help perfecting my little Access 2007 movies database, I've stumbled upon an inconvenience. In my opinion it seems basic, but still I'm not able to solve it. As an example, in my form I have two fields (Production & Distribution). These are linked to 1 table (Companies). Now each time I want to enter a new company, I have to do so manually in the table. What I would like is to be able to enter the new name in the form and that the table gets updated instantly. I think the correct term is populated.

Data Properties of the 2 Combo Boxes Production & Distribution:

Control Source: Production & Distribution
Row Source: Companies
Row Source Type: Table/Query
Bound Column: 1
Limit To List: Yes
Allow Value List Edits: Yes
List Items Edit Form:
Inherit Value List: Yes
Show Only Row Source: No
Input Mask:
Default Value:
Validation Rule:
Validation Text:
Enabled: Yes
Locked: No
Auto Expand: Yes
Smart Tags:

When I go to the main table (Movies) where all the boxes are listed and I look at the Field Properties of the boxes Production and Distribution it says at the row source:
Expand|Select|Wrap|Line Numbers
  1. SELECT [Companies].[Companies] FROM Companies; 
Looking for solutions on the internet, I couldn't figure out how to get them to work. For instance the 'INSERT INTO' command, looking at the relationships (one-to-many / many-to-many), bound or unbound (all appear to be bound), ... I tried everything using a newly copied database each time but nothing seems to work.

So yet again I'm here to ask for your help. I hope the information I gave is enough and clear.

Greetings Margie
Margie,
You just need to code a NotInList event procedure for your combobox. That way if the company name is not on the combobox selection list, your code will add it for you. See his link for an excellent step by step tutorial and code samples for the NotInList event.

http://www.fontstuff.com/access/acctut20.htm
Feb 3 '08 #2
Margie
17
Margie,
You just need to code a NotInList event procedure for your combobox. That way if the company name is not on the combobox selection list, your code will add it for you. See his link for an excellent step by step tutorial and code samples for the NotInList event.

http://www.fontstuff.com/access/acctut20.htm
Thank you puppydogbuddy. That tutorial was perfect and reasonable easy to understand. And the code I used works perfectly on all the combo boxes. This saves me really a lot of time. Thank you for your much needed help!
Feb 4 '08 #3

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

Similar topics

3
by: laurie | last post by:
Hi all, I'm trying to help out a friend who has inherited a client with a PHP shopping cart application. Neither of us know PHP, but I've been muddling my way through, trying to get these old...
0
by: Sue Adams | last post by:
I actually have two issues/questions: I have an autonumber field in an access db table that I grab and later use to update a record in another table withing the same db. The code I use to get...
3
by: Fredrik/Sweden | last post by:
Hi folks ! got this problem... i have a table 'Accounts' in my database, which contains a bunch of users. From the main menu i choose "edit user" and all users in the db are presented in a table....
4
by: John Baker | last post by:
Hi: I have two tables, a setup table (TblSetup) and a purchase order table (tblPO). When i construct a query with ONLY the tblPO shown, and a type in parameter for the PO number, I an update...
0
by: M. David Johnson | last post by:
I cannot get my OleDbDataAdapter to update my database table from my local dataset table. The Knowledge Base doesn't seem to help - see item 10 below. I have a Microsoft Access 2000 database...
5
by: cover | last post by:
I have an input form that passes data when submitted to a second form to let the user know what they have just entered into the db. My question comes with using 'update'. I'd like to query the...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
16
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
11
by: stantron | last post by:
Setup: I only have one database with one table in it. The first page has a form that adds a record (w/ 6 fields in it) to the mySQL database's lone table via PHP. This works fine. I also have a PHP...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.