change field data automatically

basilyos

Registered User.
Local time
Today, 00:34
Joined
Jan 13, 2014
Messages
256
I have a table named days contains two columns (Day_Number, Day_Number_text)


and another table named information contains many column two of them is (Day_Number, Day_Number_Text)

so what i want to do when
day_number = 1 for example so day_number_text = Frist automatically
 
There is no need to store the information Day_Number_Text in Information table again. Since you have Day_Number stored, that is more than enough. When you need to get the Day_Number_Text, you simply join the two tables.
 
you mean make a relation ship
 
Yes ! I was under the impression, you might have already created the relationship. If the relationship is defined, the JOIN will be created automatically for you when you bring the two tables in a Query grid.
 
my problem is the day_number in the basic table is a calculated field and access don't let me make a relationship with it
 
There you go ! Remove the calculation ! :rolleyes:

What is that you want to do, explain a bit. I feel you are reinventing the wheel !
 
hhahaha ok sir

look in the basic table i have a field called Printing date
and a field containg day_number it's a calculated field { Day([Printing_Date]) }

this day number will bring me just the day of the printing date

then day number text from the other table contains two column
day_number : 1,2,3,4.....,31
day_number_text : One, Two, Three.....,Thirty One

so this what i want to to when printing date is entered so day_number will automaticly bring the day (that's ok) and the day_number_text will bring the data from the other table

i hope that i can explained my problem well
 
You have explained well, give a pat on your back ! :rolleyes: Now give yourself a slap, just kidding.

You do not need to store the day_number to begin with. Any calculation should be performed in Queries/Reports. This can be so easily obtained. All you need is the raw data, which is what we need to store. In this case Printing Date, so when you need the day number just use,
Code:
SELECT printingDate, Day(printingDate) As day_number
FROM yourTable;
However if you really need the day_name, then you can create the table with day_number and day_number_text, then JOIN them in Query too. Do not store this information
 

Users who are viewing this thread

Back
Top Bottom