text box issue

oskar_diaz

Registered User.
Local time
Today, 00:02
Joined
Jul 28, 2003
Messages
18
im not sure on how to do this, but i have a form that i made with wizard. i have 2 different tables
on this form one now when i enter data i want it to update on both tables.

i.e there is a first name and last name text box from table NAME
i want to add another text box from table DATE. so i want those fields to be linked.

how do i edit the date text box so that when i clik on save that value will link to the
corresponding person.


?
 
You should not use any reserved Access keywords when naming your db objects. You have named your tables "name" and "date"?

It sounds like you have not normilized your db if you are repeating the same first and last names in different tables.

You should search the Access help files for "reserved words" in the Contents and Index option to see which words you should not use when naming your db objects.

HTH
 
I am not quite sure what you are trying to do, but from the way I understand this, you can do it one of two ways

1) Add a field called Date on table NAME and have all the information on the NAME table

2) Set up a foreign key on table NAME that is linked to the primary key on table Date.

As I said, I don't know exactly what you are trying to do, so my suggestions might not be the best way to go about it. Also, I would definately take the advice of ghudson, I would not name the tables NAME and DATE. I would name them "tblName" or "tblDate"
 
my tables are linked. im sorry for the misunderstanding but the tables names are tbl_Names and tbl_Date. This is what i mean i created these tables and made a form from wizard based on tbl_Names. So i went and added a text box and the control source i set to =[tbl_date]![Date]. So that when i want to enter a new field into that page i can also add the date to that table.

I can add names however the box which i added just says #name? im not sure what im doing wrong.
 
The fog begins to lift:)

A controlSource may be bound to a field in the form's recordSource or it may be an expression. You can't just refer to column in another table. How would Access know what row to get the data from? Typically, when you want to update two tables with the same form it is because they have a one-to-many relationship. If that is the case, add a subform based on your second table. The alternative is either using the AddNew Method of a DAO or ADO recordset or running an Append query. But we would need more details to offer any suggestion. Start with more information about your tables and their relationship.
 

Users who are viewing this thread

Back
Top Bottom