473,411 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Seemingly Easy Code Error

Sorry if this double posts...

I am trying to set the forecolor on a field of a form to Red if
priority is equal to High.
The Priority field is combobox if that matters.

If Me.Priority = "high" Then
Me.SAP_MM.ForeColor = 255
Else
Me.SAP_MM.ForeColor = 0
End If

After running this on even current i get a compile error: Method or
data member not found.

I checked and my DAO 3.6 reference is checked.

TIA,
KO
Sep 11 '08 #1
2 1194
Is there a *control* named Priority?
If not (i.e. if it's a field but not a text box), try creating a text box
for it.

It might be easier and more efficient to use Conditional Formatting onthe
SAP_MM control:
Expression: Priority="high"

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"turtle" <ko****@vistacontrols.comwrote in message
news:58**********************************@m45g2000 hsb.googlegroups.com...
Sorry if this double posts...

I am trying to set the forecolor on a field of a form to Red if
priority is equal to High.
The Priority field is combobox if that matters.

If Me.Priority = "high" Then
Me.SAP_MM.ForeColor = 255
Else
Me.SAP_MM.ForeColor = 0
End If

After running this on even current i get a compile error: Method or
data member not found.

I checked and my DAO 3.6 reference is checked.

TIA,
KO
Sep 11 '08 #2
On Sep 11, 9:34*am, "Allen Browne" <AllenBro...@SeeSig.Invalidwrote:
Is there a *control* named Priority?
If not (i.e. if it's a field but not a text box), try creating a text box
for it.

It might be easier and more efficient to use Conditional Formatting onthe
SAP_MM control:
* * Expression: * * * * * *Priority="high"

--
Allen Browne - Microsoft MVP. *Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"turtle" <kol...@vistacontrols.comwrote in message

news:58**********************************@m45g2000 hsb.googlegroups.com...
Sorry if this double posts...
I am trying to set the forecolor on a field of a form to Red if
priority is equal to High.
The Priority field is combobox if that matters.
If Me.Priority = "high" Then
Me.SAP_MM.ForeColor = 255
Else
Me.SAP_MM.ForeColor = 0
End If
After running this on even current i get a compile error: *Method or
data member not found.
I checked and my DAO 3.6 reference is checked.
TIA,
KO- Hide quoted text -

- Show quoted text -
Thanks,
the conditional formatting worked great!
KO
Sep 11 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: lawrence | last post by:
Please look at these few lines of code. You'll see that I keep echoing out the variable $name. And each time, I'm getting the correct result. But then, when it is used in an error statement, it is...
4
by: Tom Johnson | last post by:
Hi all, I cant believe that Im stuck on such simple code, but I am so... Im trying to open a text file for writing but can never get the file to initially open. Heres what Im having trouble with....
1
by: Pete | last post by:
Hello everybody -- The problem has me stopped. The page: http://www.key-horse.com/fftst.html is rendered completely differently by Firefox 1.0 and IE 6.0. The code seems to me perfectly...
3
by: Sean Quinn | last post by:
Hi, I don't know if anyone has run into similar problems, but it seems like when I use `require_once(...)' with files that contain functions I get an error indicating that it can't redeclare the...
15
by: Richard Hollenbeck | last post by:
For example, one college course has only 24 students in it, but the following code says there are zero As, 20 Bs, 16 Cs, 4 Ds, and 8 Fs. When it prints it then says 0 As, 40 Bs, 32 Cs, 8 Ds, and...
13
by: mfreeman | last post by:
The minimal code (VB.NET 2003) needed to show this problem is shown below. All I do is loop through the records in the table and update them without making any changes. Out of 600 records, about...
3
by: | last post by:
I'm seeking (probably basic) guidance on the right way to split a large site that's supposed to represent one domain(mydomain.org) into many small VS.NET projects, and how to avoid issues with...
3
by: akirekab | last post by:
I am tired, as I have done this or similar things many times, I am not seeing the problem here. I will run a query producing the following SQL SELECT tblInterviewRecord.FaceToFaceReasonID,...
1
by: turtle | last post by:
If Me.Priority = "high" Then Me.SAP_MM.ForeColor = 255 Else Me.SAP_MM.ForeColor = 0 End If
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
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...

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.