table design

F

Faisal

There is any way to have a field name should automaticaly liknked with
another table
becuse i want to design a table in there field name should updated
utomaticaly from another table
any tips
regrds
faisal
Riyadh
 
F

FredFred

It sounds like a bad idea, there are better (and accepted) ways to accomplish
what you are looking for.

By the fact that you are talking about updating a field in a particular
record based on a change in a field in a particular record means that there
is some relationship that ties those two records together. If this is a
simple "one-to-one" relationship between the records, then you chould combine
them into a single table. If not, then you should link them.

The next step would require knowing more about the structure of your data
and what you are trying to do. But generally speaking, you should just show
the single field with that data wherever you need it (in a query, form or
report) , not have two fields with the same data.
 
T

Tom van Stiphout

On Tue, 4 Dec 2007 02:10:01 -0800, Faisal

No. You need to write an Update query, and run it when the field
value changes, likely in its AfterUpdate event.

You may also need to reexamine your database design. These
interdependencies often are indicative of db design problems.

-Tom.
 
L

Lance

Not automatically, but the following code will allow you to easily change a
field name via code.

Sub Change_Field_Name(Target_Table As String, Old_Field_Name As String,
New_Field_Name As String)
On Error GoTo error_handler
Dim db As Database
Dim tdf As TableDef

Set db = CurrentDb
Set tdf = db.TableDefs(Target_Table)

tdf(Old_Field_Name).Name = New_Field_Name

Set tdf = Nothing
Set db = Nothing
Exit Sub
error_handler:
MsgBox Err.Description

Set tdf = Nothing
Set db = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

table designing ms access 1
photo field 4
data validation in text box 2
vaccation sate 1
new data user 1
table design view information 3
table design view information 1
bigest date in the date field 1

Top