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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
form won't change color
I have a text field that opens another form on the DblClick event. In the
event there is more than 1 record in the form, I have the following code: If Me.RecordsetClone.RecordCount 1 Then Me.Section(0).BackColor = 9567269 Else Me.Section(0).BackColor = 14811105 End If The form will not change color until I click on the 2nd record. I have put this code in the On OPen, OnLoad, OnCurrent events & can't get it to change to the different color until using the navigation buttons gets me to the next record. I also changed the form view to Continuous. Any ideas what I"m doing wrong? |
#2
|
|||
|
|||
On Sun, 3 Apr 2005 16:57:02 -0700, Donna wrote:
I have a text field that opens another form on the DblClick event. In the event there is more than 1 record in the form, I have the following code: If Me.RecordsetClone.RecordCount 1 Then Me.Section(0).BackColor = 9567269 Else Me.Section(0).BackColor = 14811105 End If The form will not change color until I click on the 2nd record. I have put this code in the On OPen, OnLoad, OnCurrent events & can't get it to change to the different color until using the navigation buttons gets me to the next record. I also changed the form view to Continuous. Any ideas what I"m doing wrong? Your code is telling it not to open UNTIL you have that 2nd record. Try: If Me.RecordsetClone.RecordCount = 1 Then -- Fred Please only reply to this newsgroup. I do not reply to personal email. |
#3
|
|||
|
|||
Additionally, you may have to repaint the form using
me.repaint Cheers John webb -- Message posted via http://www.accessmonster.com |
#4
|
|||
|
|||
But now the form changes color when I only have one record in it. I need it
to change color only when there is more than one record - to alert the user to use the navigation buttons to look for more records "fredg" wrote: On Sun, 3 Apr 2005 16:57:02 -0700, Donna wrote: I have a text field that opens another form on the DblClick event. In the event there is more than 1 record in the form, I have the following code: If Me.RecordsetClone.RecordCount 1 Then Me.Section(0).BackColor = 9567269 Else Me.Section(0).BackColor = 14811105 End If The form will not change color until I click on the 2nd record. I have put this code in the On OPen, OnLoad, OnCurrent events & can't get it to change to the different color until using the navigation buttons gets me to the next record. I also changed the form view to Continuous. Any ideas what I"m doing wrong? Your code is telling it not to open UNTIL you have that 2nd record. Try: If Me.RecordsetClone.RecordCount = 1 Then -- Fred Please only reply to this newsgroup. I do not reply to personal email. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is it possible to show both "Yes" and "No" answers from a "yes/no" checkbox? | Colin Foster | New Users | 28 | March 18th, 2005 02:19 PM |
How do I get colour separated printouts red and black? | Karen | Publisher | 2 | November 27th, 2004 11:14 PM |
open a form through a subform in access 2000 | Tammy | Setting Up & Running Reports | 12 | October 22nd, 2004 02:43 PM |
Strange stLinkCriteria behaviour on command button | Anthony Dowd | Using Forms | 3 | August 21st, 2004 03:01 AM |
auto entry into second table after update | Tony | New Users | 13 | July 9th, 2004 10:42 PM |