If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Subform Controls on Multiple Records Issue

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-09-12, 16:30
nic311 nic311 is offline
Registered User
 
Join Date: Nov 2011
Posts: 53
Subform Controls on Multiple Records Issue

Hi,

I have a form with a subform on it which is populated by a querydef built based on selections made on the two combo boxes on the main form. The values in the subform are all dates. While there are times when the subform returns a single value, there are other times when there are multiple records on the subform. My goal is to do some conditional formatting on the subform controls so that if the date < today's date, then that text box turns red, but if date on subform text box > today's date then that text box turns green.

From what I have read so far, Access does not allow for controls on a subform to be treated separately, which is probably why all of the records on my subform reflect the colors based on my first record.

Does anyone know a way around this feature of Access so that I can in fact treat each of the records as individual? Any help would be greatly appreciated as I have been struggling with this issue for a few days.

Thanks in advance!
Reply With Quote
  #2 (permalink)  
Old 01-09-12, 17:46
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
You can do that using the Conditional Formatting feature. In Design View, Right-Click on a TextBox and select Conditional Formatting from the contextual menu.
__________________
Have a nice day!
Reply With Quote
  #3 (permalink)  
Old 01-09-12, 18:39
Missinglinq Missinglinq is offline
Registered User
 
Join Date: Jun 2005
Location: Richmond, Virginia USA
Posts: 1,702
Quote:
Originally Posted by nic311 View Post
...From what I have read so far, Access does not allow for controls on a subform to be treated separately, which is probably why all of the records on my subform reflect the colors based on my first record...
Actually, all of the Records reflect the Value in the Current Record, not necessarily the First Record. It's just that the First Record is the Current Record when the Form first opens. And, as Sinddho said, Conditional Formatting through the Menu is the only way to do this on Continuous or Datasheet View Forms.

Linq ;0)>
__________________
Hope this helps!

The Devil's in the Details!!

All posts/responses based on Access 2000/2003
Reply With Quote
  #4 (permalink)  
Old 01-10-12, 07:50
nic311 nic311 is offline
Registered User
 
Join Date: Nov 2011
Posts: 53
I can't seem to find this conditional formatting on the menu when I right click a text box. I might mention that I'm using Access 97... could this be the reason that this option is not there?
Reply With Quote
  #5 (permalink)  
Old 01-10-12, 08:43
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
That could be the reason indeed. I don't remember when this feature was introduced in Access but I would not be surprised to learn that it was in the 2000 version.
__________________
Have a nice day!
Reply With Quote
  #6 (permalink)  
Old 01-10-12, 08:58
Missinglinq Missinglinq is offline
Registered User
 
Join Date: Jun 2005
Location: Richmond, Virginia USA
Posts: 1,702
That's correct. Here's a link I have archived that I nelieve provides a workaround for pre-2000 Access:

Forms: Colors and Continuous forms

Linq ;0)>
__________________
Hope this helps!

The Devil's in the Details!!

All posts/responses based on Access 2000/2003
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
Pingbacks are On
Refbacks are On