473,569 Members | 2,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Conditional Format Form within a Form

5 New Member
Hey guys i'm kind of confused. I'm new to access but I've been getting a lot of progress.

I have a form FRMDATABASE that is loaded into FRMSEARCH and frm search has a bunch of txtboxes that searches the the FRMDATABASE but now I need to conditional format the data within the FRMDATABASE and I have to do it based of code sense I can't limit it to 3.

I use this on the report of the searched criteria and it works like a charm:
Expand|Select|Wrap|Line Numbers
  1. If [Description] Like "*" & "Print Not Available" & "*" Then
  2. [Description].BackColor = &H51A8FF
  3. [Description].FontBold = True
  4. [Description].ForeColor = vbBlack
  5. ElseIf [Description] Like "*" & "In Production" & "*" Then
  6. [Description].BackColor = vbYellow
  7. [Description].FontBold = True
  8. [Description].ForeColor = vbBlack
  9. Else
  10. [Description].BackColor = vbWhite
  11. [Description].FontBold = False
  12. [Description].ForeColor = vbBlack
  13. End If
  14.  
  15. If [General Notes] = "*" & "Ready to Ship on Rack" & "*" Then
  16. [General Notes].BackColor = &HA8ACFF
  17. [General Notes].FontBold = True
  18. [General Notes].ForeColor = vbBlack
  19. ElseIf [General Notes] Like "*" & "Need Test Sheet" & "*" Then
  20. [General Notes].BackColor = &HFFFF00
  21. [General Notes].FontBold = True
  22. [General Notes].ForeColor = vbBlack
  23. ElseIf [General Notes] Like "*" & "Error" & "*" Then
  24. [General Notes].BackColor = vbRed
  25. [General Notes].FontBold = True
  26. [General Notes].ForeColor = vbWhite
  27. ElseIf [General Notes] Like "*" & "Order on Hold" & "*" Then
  28. [General Notes].BackColor = vbRed
  29. [General Notes].FontBold = True
  30. [General Notes].ForeColor = vbWhite
  31. Else
  32. [General Notes].BackColor = vbWhite
  33. [General Notes].FontBold = False
  34. [General Notes].ForeColor = vbBlack
  35. End If
  36.  
I tried making this on the frmSearch under Public ConditionalForm at() <- my own public sub and call for it when they click the search button so the results are formatted.

It pups up errors and stuff.

Also FRMDatabase is based of a query qryDatabase which is based of the main table tblDatabase.

Thanks in Advance!
Jan 13 '08 #1
1 1455
Rabbit
12,516 Recognized Expert Moderator MVP
Please use code tags.

Where is the Function located? In the form code module?
Where are you calling the function? From the report? Because you can't do that, it is out of the purview of the report.
And most importantly, what are these error messages you get? It helps to know what errors you're getting if we're going to resolve these errors.
Jan 14 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
5495
by: Allan Koch | last post by:
Dear NG, I would like to format a record in a subform, dependent on a value in one field. If one field in the record I show in a subform (datasheet view) is true I like to view that particular row in green, all other rows just as they are normal. Is that possible ? regards Allan
0
1245
by: web1110 | last post by:
Hi again, I am referring an earlier question here trying to enlarge upon the concept I am pursuing.: Each object is a subassembly. They are all significantly different in detail and content but are all derived from an abstract subassembly class. An assembly is defined as a tree of subassemblies. There are multiple levels of...
1
1560
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. This work fine for most cases, allowing the user to resize the form (and controls within the form. The forms them selves are create dynamically...
1
1192
by: Geoff Jones | last post by:
Hi Can anybody give me some example code on creating a form within another form which is centered to the first form? Thanks in advance Geoff
1
4459
by: Martin Schneider | last post by:
Hi! I have an unbound text field conditionally formatted: =DomWert("";"ActiveLines") (DomWert is the german translation for domain value) (to check whether the currend record is within the set of records returned by a query).
0
1424
by: Martin Schneider | last post by:
Hi! I'd like to set the 'enabled'-property for a checkbox depending on a conditional format. Unfortunately, the object doesn't feature a format condition. Is there a solution for this? Alternatively I'd like to disable the whole record (but only this one) - is that possible? Best regards,
2
8608
by: Lyn | last post by:
Hi, Having fun trying to get Conditional Formatting working on a textbox control in a continuous form subform (Access 2003). The condition I want is when the value of the textbox is Null and/or an empty string. 1) Using Access: I select "Field value is" and "equal to". Not sure what to put in the Expression1 field. Have tried leaving it...
2
1907
by: keri | last post by:
I would like to set up conditional formatting on a form. One of the fields on the form is a date (). If the calldate field is over 365 days ago I would like all the other fields on the form line to turn green but I am not sure if this is possible. Thanks
3
3196
by: kate2272 | last post by:
Hi Guys I was wondering if it is possible to turn AllowEdits to false after data has been entered for individual fields within a form/sub-form. I've found that I can do this in the 'AfterUpDate' by assigning Me.AllowEdits = False .... BUT this then doesn't allow me to update data in other fields within that form/sub-form after it has been saved...
0
7698
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7673
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7970
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.