doucet1963
Registered User.
- Local time
- Today, 04:40
- Joined
- Feb 4, 2017
- Messages
- 18
I looked at a lot of forums and still cannot find a solution to my conditional formatting issue and I have been at it for more than a month. The VBA codes that I tried do not work!
In Access 2010, I have a continuous form that is generated from a query. In the form there is a locked textbox named [organization], the textbox is part of a table named [Tbl_Location]. The [Tbl_Location] is in a relationship with a table named [Tbl_Document] by a field named [OrganizationID]. That last table tracks the organizations status i.e. “good” or “bad” and when the organizations status change from a “Bad” to a “Good” status then a checkbox is used to identify the valid one. i.e. a checkbox that is selected means that the status is no longer valid while an unchecked checkbox in the table means the new status is valid.
I want to highlight on the form the [organizations] based on a “Good” [Status] when the [textbox] is unchecked. I do not want to highlight the organization that do not meet these conditions.
The VBA could be something like this”
Private Sub Form_Load()
If [tbl_Document].[status]=”Good” and [checkbox] = false then
me.Organization .BackColor = vbRed
End if
End sub
I forgot to mention that the [Organization] [Status] is amended by another form using a combo box, the operator has three selections, "Good", "Bad" or "Blank".
In Access 2010, I have a continuous form that is generated from a query. In the form there is a locked textbox named [organization], the textbox is part of a table named [Tbl_Location]. The [Tbl_Location] is in a relationship with a table named [Tbl_Document] by a field named [OrganizationID]. That last table tracks the organizations status i.e. “good” or “bad” and when the organizations status change from a “Bad” to a “Good” status then a checkbox is used to identify the valid one. i.e. a checkbox that is selected means that the status is no longer valid while an unchecked checkbox in the table means the new status is valid.
I want to highlight on the form the [organizations] based on a “Good” [Status] when the [textbox] is unchecked. I do not want to highlight the organization that do not meet these conditions.
The VBA could be something like this”
Private Sub Form_Load()
If [tbl_Document].[status]=”Good” and [checkbox] = false then
me.Organization .BackColor = vbRed
End if
End sub
I forgot to mention that the [Organization] [Status] is amended by another form using a combo box, the operator has three selections, "Good", "Bad" or "Blank".