Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Highlight and Colour records in a continuous form

Status
Not open for further replies.

Michaelcree

Instructor
Oct 3, 2002
29
GB
Hello All

Can anybody help?

I have a database running on a SQL server with Access as the front end. The table is displayed and accessed as a continuous form. One of the fields in the table is a date. I need to check this date and if it is more than 30 days old change the colour of the record on the continuous form.

I have looked at Conditional formatting but cannot work out the options to put in to make this work.

My question is does anybody have any idea how I can do this either using Conditional formatting of using VBA code?

Many Thanks for your help in advance
 
Code approaches to this are - hard - but there are some that can be found at Stephen Lebans, but thei're mostly abandoned since the 2000 version and conditional formatting.

To format the whole row, in design view, select all controls (not checkboxes, I think, I'm not to sure about combos either), then in conditional formatting, select "Expression is", then enter:

[YourDateField]<Date()-30

Alter the format...

Note - use [brackets] on the field name.

And - since this is the Visual Basic/Databases forum, perhaps have a look at the Access fora for future Access questions? There are seven of them, found through forum search at the top;-)

Roy-Vidar
 
Thanks for you help this worked a treat -- My mistake for putting it in the wrong forum -- Realised after posting but could not see a way of moving/deleting it after it was posted

 
My mistake for putting it in the wrong forum
Not necessarily the wrong forum, but rather that an Access forum would be a better forum for questions concerning an Access front end.

To remove a forum click the red flag link at the bottom center of each post and just explain that you posted incorrectly. Management will remove the thread.

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top