Using Forms to Update tables (1 Viewer)

beckie1234

Struggling Student
Local time
Today, 00:18
Joined
Mar 10, 2007
Messages
94
I have about the same problem as Naia. I need to create a form that will update three different table, but the user doesn't know what the number is pertaining to specific items. (the primary key) (These tables are being used to feed cascading combo boxes.) So he would like to be able to to choose from a list to that will populate each box (like the cascading combo boxes) on the form which I can do but how do I make it update the tables? The new input goes into a text box, but now what ? How do I get it to send that information to the table he wants to update?
 

rainman89

I cant find the any key..
Local time
Today, 03:18
Joined
Feb 12, 2007
Messages
3,015
If you set the control source of those txtboxs to the field in your table it will add the new record to the table
 

beckie1234

Struggling Student
Local time
Today, 00:18
Joined
Mar 10, 2007
Messages
94
Will it force all three choices or only the one in the text box? I need all three to go to the table.
 

rainman89

I cant find the any key..
Local time
Today, 03:18
Joined
Feb 12, 2007
Messages
3,015
Well if the combo boxes populate a txtbox after you select them then it will fill out all 3 assuming they are seperate fields and assuming u have them bound to the appropriate fields, Then you would go to a new record for another entry.. etc etc..
 

beckie1234

Struggling Student
Local time
Today, 00:18
Joined
Mar 10, 2007
Messages
94
How would you bind them depending on which one of the tables you want to update?
 

beckie1234

Struggling Student
Local time
Today, 00:18
Joined
Mar 10, 2007
Messages
94
How would you bind them depending on which one of the tables you want to update? I do have the text box but the only thing that changes is the catName field in the first row of the second table instead of the of the last row that allows the auto number to work.
 

beckie1234

Struggling Student
Local time
Today, 00:18
Joined
Mar 10, 2007
Messages
94
Would it work if I made the cascading combo boxes to give the user the information he needs and then created a text box for each individual field that the user wants to update with a button to update the record for each table?:confused:
 

rainman89

I cant find the any key..
Local time
Today, 03:18
Joined
Feb 12, 2007
Messages
3,015
that could work yes, im a bit fuzzy on what u are actually trying to accomplish though so i cant really give you too much information.
 

beckie1234

Struggling Student
Local time
Today, 00:18
Joined
Mar 10, 2007
Messages
94
The user wants a form to update the tables I have created as new things come up. The first two tables follow the convention of using autonumber for the primary key which becomes the foreign key in the next table. The tables are the line, machine center, and category. He doesn't want just anybody updating the tables, so he asked me to create a form that has a hidden button on the switchboard that he can open and update the tables himself. since he doesn't know the primary keys to update with, he wants to be able to view that information and use it to update the appropriate table. The line will never change, there are only 2, but the center and categories have new items that are added as needed and he wants an easy way to update those tables without actually having to go in and type it into the tables.
Does that make sense?
 

rainman89

I cant find the any key..
Local time
Today, 03:18
Joined
Feb 12, 2007
Messages
3,015
T since he doesn't know the primary keys to update with,
Which he shouldnt!!
he wants to be able to view that information and use it to update the appropriate table. The line will never change, there are only 2, but the center and categories have new items that are added as needed and he wants an easy way to update those tables without actually having to go in and type it into the tables.
Does that make sense?
yes it does. so he needs to be able to add a new items to either the category or center.
you can use the wizard to create a form based on the table and when u add a new record to that, it will update the table.
u can create a combobox on the form whose source is LineID that will update the lineID(im assuming this is the FK) for the new records
 

Users who are viewing this thread

Top Bottom