vba - If statement with textbox color as a condition -


this access 2007 using vb on form. i'm trying run code when 3 text boxes green , if aren't green message box appear asking correct errors before exporting. there better way to evaluate 3 conditions? , read color value should use me.text1.value = vbgreen?

i appreciate help

 if me.text1 = "vbgreen" , me.text3 = "vbgreen" , me.text5 = "vbgreen"     call runexpzip     else     msg = msgbox("please correct errors before exporting", vbcritical)     end if 

unless text in textboxes word "vbgreen" need check backcolor property of textboxes. (or forecolor if text-colour, rather background.)

this value won't evaluate vbgreen (65280) though; standard green have value 5026082:

if me.text1.backcolor = 5026082     'etc. 

presumably, though, colour set using conditional formatting. in case better (in opinion) check conditions (that make them green) rather checking colour itself. (a tiny change colour mean if-condition(s) not met.)


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -