Conditional Format - Form Background
Mar 24, 2006
Could some kind person out there help me out please?
I have been 'dabbling in' the area of "conditional formatting", particularly in the area of changing the colour of my active form based on the result of whats input on a text box. I have had some success in this area but where I am getting confused is getting the colour of my form to change on the basis of what is entered into a text box control that does not match exactly. My form background changes to the required colour when its value is 'set exactly' or matches, but what I am trying to achieve is to change it according to the first letter of entry regardless of what follows thereafter? It always starts with a letter, either a ‘D’ or ‘V’ to indicate whether its ‘Vital’ or ‘Desirable’ and is subsequently followed by no more than 6 numbers and finally a letter. Basically I need my form to change colour based on the whether it is either a ‘V’ or a ‘D’ irrespective of what follows???
What I have been using so far is:
Private Sub Model_Number_AfterUpdate()
If Me.Part_Number = "V111145K" Then
Me.Section(acDetail).BackColor = 12632256 'Light Red
Else
Me.Section(acDetail).BackColor = 8421631 'Blah Gray
End If
End Sub
.................................................. .................................................
Private Sub Form_Current()
If Me.Part_Number = "V111145K" Then
Me.Section(acDetail).BackColor = 12632256 'Light Red
Else
Me.Section(acDetail).BackColor = 8421631 'Blah Gray
End If
End Sub
Your help would be gratefully appreciated:confused:
Thanks Very Much
Carol
View Replies
ADVERTISEMENT
Jan 14, 2014
I have a field on a form OrderDate and a field DOB. I am not sure how to create an expression in conditional formatting that:
=IF([DOB] - [OrderDate] <30), Then background is red
So if the OrderDate is 1/1/2014 and the DOB is 1/15/2014 then the DOB field turns red
If the OrderDate is 1/1/2014 and the DOB is 2/29/2012 then the DOB field does not turn red.
View 8 Replies
View Related
Sep 14, 2006
Hi All,
I'd lile to show/hide selected subforms based on the the text in a txtfield.
The text in the selection field (txtSelect) I'd like to use for that may be either one of the following:
book-01, book-02, book-03 etc OR,
folder-01, folder-02, folder-03 etc OR,
record-01, record-02 record-03 etc. OR
it can be just a 4 digit number.
If the txtSelect contains "book" I'd like the subfrmBookdetails to be visible.
If the txtSelect contains "folder" obviously the subfrmFolderdetails etc.
What I'm struggling with is the If-Then statement for selecting the partial text in txtselect.
I've tried things like this:
On current
me.txtSelect.setfocus
if me.txtSelect.text="book*" then
me.subfrmBookdetails.visible=true etc etc.
No joy.
I know how to get this to work in a query with a like-statement but I have not been able to find anything on this in relation to conditional formatting of a form. Any one and good ideas?
Thanks,
Walter
View 2 Replies
View Related
Feb 5, 2014
I would like to have a Positive value with a green Background and a Negative Value with a Pink Background.
View 3 Replies
View Related
Sep 8, 2013
How do I change the background colors and text formatting in all of the reports in one database at the same time? If this is not possible, is there an easier way to change the report formatting without going through every report?
View 2 Replies
View Related
Apr 18, 2006
Hi,
I am trying to place some code in the "expression is" section of conditional formatting. Need some help converting from code to conditional formatting format.
I have set up a check box "Check83" next to a standard control box "Title(O)".
Below is the code I am currently using. This code is in the after update section of the check box, and in the oncurrent section of the form.
This code turns the box blue when I click the check box.
Private Sub Check83_AfterUpdate()
If Me.Check83 Then
Me.[Title(O)].BackColor = vbBlue
Else
Me.[Title(O)].BackColor = vbWhite
End If
End Sub
My form has 46 records and all have check boxes linked to the control box with the code above. When the box is blue in record 1, I don't want there to be a blue box in record 2. Can't figure out how to do this. Tried to do in with code, but failed. Thought it may be possible using conditional formatting.
Thanks in advance for your help
Jcwishart
View 3 Replies
View Related
Feb 23, 2005
Because they are more efficient, I am using hyperlinks to connect my forms. I want to be able to deactivate hyperlinks based on criteria that are selected.
Please help! :o
View 3 Replies
View Related
Dec 2, 2013
I have a report with a list of employee names (and other information). A handful of them need to be a different color (other than default). There will always be more than 3, so I can't use the conditional formatting tool.
View 14 Replies
View Related
Jan 24, 2008
Hello All,
I have searched the forum but I don't quite get what I am looking for.
I have a subform that has these 2 fields:
- Status
- LastFollowup
What I want is if the Status shows "Pending" and the date entered on the LastFollowup is more than 7 days. Then it should turn Yellow.
I tried this code in the expression box but it doesn't seem to work
[Status]="Pending" and [LastFollowup]>7
Could anyone please assist? I know this is simple but it's not working for me.
Thank you
View 6 Replies
View Related
Dec 7, 2005
Quick question.
I have a continuous form in Access 2003 listing products for return for a customers. I am in the process of creating a completion form which will just have the product number, model number and then a command button called complete.
What I'm doing is have it so when the person clicks the button it adds a value to a field saying Complete. OK. But, what I then want it to do is for any record thats associated with this customer where the field = complete to have the command button gray out.
Is this possible? I know I can conditional format a text box to do this but can't see a way to do it with a command button? Any ideas?
I have though of layering a transparent button and having a textbox behind this with complete in and having this change colour but not sure if thats the best way?
View 1 Replies
View Related
Feb 1, 2005
:D I am using a continuous form, and I cannot figure out what conditional formatting expression to use to change controls in the ACTIVE RECORD.
For example, continuous form may have:
RECORD1: Field 1 Field 2 Field 3 Field 4
RECORD2: Field 1 Field 2 Field 3 Field 4
RECORD3: Field 1 Field 2 Field 3 Field 4
When I am in Field 1,2,3, or 4 in RECORD2, I want Fields 1,2,3 AND 4 to change color in RECORD2
PLEASE HELP!
View 5 Replies
View Related
Dec 11, 2013
I'm exporting a query to Excel, and I want to be able to conditionally format certain rows of the export using Access VBA. Is this possible?
View 1 Replies
View Related
Feb 4, 2005
I'm having trouble with a tricky conditional format in a continuous subform.
The criteria is based on field [GroupNo] when it changes (increases) which are always listed in numerical order.
Basically all I want to is for the text box colour to alterante (eg blue & yellow)when GroupNo changes value
So it would look something like this....
Group NoID (highlight colour)
1 (yellow)
1 (yellow)
1 (yellow)
2 (blue)
2 (blue)
2 (blue)
3 (yellow)
3 (yellow)
etc etc
btw, although values will always be in order they may not all be output, so it's not just case of odd, even, odd, even (that would be too easy!)
I can retrieve the Previous Record's GroupNo value (via a function) in another text box and compare current GroupNoID with this in the Format Expressions and manage to change the colour, but it won't sustain this new colour for the subsequent same GroupNos, obviously as the values have changed.
So how can I....
Change the colour when the value changes.
Keep this new colour until it the value changes (increases) again.
Many Thanks
View 14 Replies
View Related
Jun 17, 2015
I have a report and i'm trying to set up the conditional format to highlight any dates within January red.
View 1 Replies
View Related
May 20, 2014
I have a short date field 5/20/2014
I would like to set up a conditional format to format those fields in the current month. For example, this month is would format all fields with "5".
Next month all fields with "6"
In the month space.
I can't seem to figure out the expression, I know I'm close.
View 4 Replies
View Related
Jun 26, 2015
Have a continuous form with 2 date fields in each record .
If dateField1 is empty ,Then I want a way to make DateField2 Take its Place .
I know how to make things happen with conditional formatting on one field by UsingIsNull ,I have tried sending datefield2 to back.But cant work out how to bring it to front If DateField1 IsNull.
View 3 Replies
View Related
Aug 3, 2005
HI
How can I use/set an image (picture) as a background in a form? I can't seem to find this option...
thank you
regards, Miha
View 6 Replies
View Related
Jul 6, 2006
pls Help,
I knw how to change the background of a form. but i need a particular file for the background. and i want to knw where the file is stored?
the file which i want is a texture file in a WORD. i.e. in word when we try to set the background of a page, the option Background gives us some textures for the background. i want a file called "water droplets" as a back ground in access form.
from where can i get the texture file?
i searched the whole Microsoft Office folder in c:program files. this file is not there. then where are this texture files stored? can anybody help me to find this file pls?
View 6 Replies
View Related
Nov 23, 2006
I have a master form with a picture as the background with a timer event that fires every 5 minutes. I have a subform (a clock) with a timer event every second to update the text. How do I make the sub form background transparent so that I see the master form back ground?
I did it this way so I didnt have to update the master form data every second.
help would be much appreciated.
regards
View 3 Replies
View Related
Apr 5, 2005
Hi,
I have design a form using the tab control. I need to add in color to make it more professional. Is there a way I can do it. I realised the filled /Back color icon is faded in color in design view.
Appreciate any help in this. Thanks.
View 2 Replies
View Related
Mar 6, 2006
I was wondering if this was possible. I did a search on Google and on this form and I could not find anything. Is it possible to display a form without displaying Microsoft access in the background? In other words I would like to display just the form alone with access running or if possible a way to have access minimized with the form still showing. If anyone knows any tricks on this could be performed I would be very grateful.
Thanks, Chad :)
View 3 Replies
View Related
Jul 24, 2006
what's it?
I want to open the same form with different buttons (cos different criteria are attached to those buttons).
When i click i want the background to change based on the button.
So im asking for just one line of code: What's the vba to change background property of a form dynamically. cna't seem to find it :o
View 1 Replies
View Related
Apr 30, 2006
I searched around but i couldnt really find or atleast understand how to do what i want to do. I want upon the user clicking on a checkbox for the background of the form to change to a set color?
View 8 Replies
View Related
Jul 20, 2006
I have a form that contains a toggle button. When a record is complete and considered closed I click the toggle button. I want to make the form background turn red if I enter into a record that has been closed. :confused:
If this is not possible, is there something similiar that would stand out:rolleyes:
Can someone tell me how to do this? Thanks!
View 8 Replies
View Related
Mar 6, 2008
Just wondering... is this possible.
I have a database with 200 clients. If a user pulls up a record and the customer's insurance has expired, is it possible to change the background color of the form so that this automatically alerts the user that this customer needs to be contacted and the record needs to be updated?
Or are there any other suggestions that may serve the same purpose?
View 1 Replies
View Related
Apr 22, 2015
I have a form that that contains a button that opens a report. The code I use to open said report is:
Code : DoCmd.OpenReport "Comp and NB Targets Q4", acViewPreview, , strWhere
The issue is that occasionally when the user prints from that preview, it can instead print out the form in the background that was used to open the report.
This seems to happen at random and I have not yet found a pattern or solution to the problem.
Is there a reason this could be happening and is there anyway to stop it?
View 5 Replies
View Related