You can write a sub that gets called from the AfterUpdate event of each of the fields that you're checking. The sub should check if each of the relevant fields has a valid value. If a field is text, you could check that length of the field is greater than 0; if the field is numeric, you could check that it's not null. If each field has a value, the sub should either print a message to the user or set the Enabled property of your button to true. <br><br>Private Sub CheckWhetherDone()<br>' This assumes Field1 is text and Field2 is numeric.<br>' The following If statement should check all of the relevant fields. Include them instead of the ...<br> If (len(Field1)>0) and (not isnull(Field2)) and ... then<br> MsgBox "All fields have been filled"<br> OR<br> Me!Button.Enabled = true<br> End If<br>End Sub<br><br>Private Sub Field1_AfterUpdate()<br> CheckWhetherDone<br>End Sub<br><br>
I have as button an image called Image10. I replaced the Me!Button.Enabled=true with Me!Image10.Enabled=true and it doesn't work right.<br> <br>Thank you.
Are you sure you are working with a button? What does it say at the top of the propertysheet? It should say "Command Button: " followed by the name of your command button.<br><br>Please be more specific in future about what isn't working. What is not happening that should be or what is happening that shouldn't be?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.