By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,347 Members | 2,113 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,347 IT Pros & Developers. It's quick & easy.

Seemingly Easy Code Error

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.