Ask Experts Questions for FREE Help !
Ask
    susan100's Avatar
    susan100 Posts: 1, Reputation: 1
    New Member
     
    #1

    Feb 4, 2008, 09:51 PM
    How to highlight, update and replace in same table
    I would like to highlight a field in a table or form by changing background color when someone turns 18 years old. THis alerts me to delete them from the database of over 5000 names. I have a [DOB] date of birth field currently. Also, when I enter a new record in the database and put in the birthdate how can I if I add a new column named age(which shows their age) automatically update to show their age? Last question how do I delete a hyphen out of a number field and replace with a space for about 2000 of the 5000 records?
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #2

    Feb 29, 2008, 07:36 AM
    Look at conditional formatting.

    You should NOT be storing age. As a general rule we do not store calculated values. You can use the following expression to calculate the age of a person:

    DateDiff("yyyy", [Bdate], Now())+Int( Format(now(), "mmdd") < Format( [Bdate], "mmdd") )

    You can use that (adding >=18) as the Condition for control you want to change the background color for.

    On another note, you would do this on a form, not a table. Interaction with data should only be done through forms. And you don't have fields on a form, you have controls that may or may not be bound to fields in a table. This is a subtle but important distinction.


    Finally, you would use the Replace feature under the Edit menu.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

How to update AVG antivirus Update to computer,which is not connect with internet [ 2 Answers ]

Hello, Computer (No.A) is connected with internet. So I can get the update automatically. But, Computer (No.B, and No.C ) is not connect with internet. But we use the flash Drive and 3 1/2 Floppy disk. Without antivirus software, No.B & C can get the virus. Already having the antivirus software...

Highlight Disaster [ 1 Answers ]

I am a women of color and I have dark brown hair and yesterday I went to the salon and got highlights. My highlights are a very light brownish blonde. After I left the salon I begin to hate how light the highlights are. What can I do to tone them down or go back to my dark brown and how long do I...

Highlight- update 2- Thanks for suggestions.. [ 1 Answers ]

Am going to try right now --- also discovered the 'SPIKE' feature --- love it. I'm hoping new suggestions even better. Will let you know. Thanks again!

WORD -- highlight , update [ 2 Answers ]

THANKS: helper05 and ScottGem. Answers helped. Made me realize I didn't phrase my question quite right. Started with 104 pg. 'PDF' file. Saved it as a 'word' file. My goal is to highlight a topic, or phrase, or a couple sentences, etc... for an entire section. Then, save all my...


View more questions Search