Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 1st, 2008, 05:57 AM
Authorized User
 
Join Date: May 2007
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default conditional formatting

Hi all,

Got a novel or quick one for you. I have two text boxes on a form which have conditional formatting applied. The textboxes are unbound linked to separate DCount queries. The form as its a menu regularly being used rather than reload it, when not being used is hidden.

However when its made visible again the conditional formatting is not always being applied. I am using Access 2000 with this system. My code for the activation is:

Private Sub Form_Activate()

    'check the reminders
    Me.txtoutstanding.Requery
    Me.txtfuture.Requery

End Sub


The source for the two fields are:

=DCount("inspectid","qryoutstanding3")

=DCount("inspectid","qryfuture")

My question is there a way to get trigger the conditional formatting from within VBA without building the whole sql query for them both in the VBA to give the system a kick when it doesn't like doing it automatically.

However if you think it will make the system run quicker and easier then by all means tell me so.

Reply With Quote
  #2 (permalink)  
Old July 3rd, 2008, 11:13 AM
Friend of Wrox
Points: 3,947, Level: 26
Points: 3,947, Level: 26 Points: 3,947, Level: 26 Points: 3,947, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,150
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

How about adding a Me.Refresh at the end there so that the form itself refreshes (as opposed to JUST the two textboxes)?

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote
  #3 (permalink)  
Old July 3rd, 2008, 12:05 PM
Authorized User
 
Join Date: May 2007
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

tried that one and it works fine for the future, just not the overdue box

Reply With Quote
  #4 (permalink)  
Old July 3rd, 2008, 12:17 PM
Friend of Wrox
Points: 3,947, Level: 26
Points: 3,947, Level: 26 Points: 3,947, Level: 26 Points: 3,947, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,150
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

So your code looks like this?

Private Sub Form_Activate()

    'check the reminders
    Me.txtoutstanding.Requery
    Me.txtfuture.Requery
    Me.Refresh

End Sub


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
Reply With Quote
  #5 (permalink)  
Old July 3rd, 2008, 12:20 PM
Authorized User
 
Join Date: May 2007
Location: , , .
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

used to when the me.refresh line didn't work i deleted it.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting in Continuous Forms Balasarius Access 3 September 19th, 2008 08:06 AM
Conditional formatting vemaju Excel VBA 2 June 6th, 2007 05:41 AM
Conditional Formatting on Subform echovue Access 4 March 3rd, 2006 03:25 AM
Conditional Formatting Corey Access 1 November 8th, 2005 12:18 AM
Conditional Formatting... In Access??? lguzman Access VBA 2 September 23rd, 2004 04:52 PM



All times are GMT -4. The time now is 09:09 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.