after update text

awake2424

Registered User.
Local time
Today, 17:26
Joined
Oct 31, 2007
Messages
479
Is it possible in Access 2010 to have an after update that if a criteria text is met, then a checkbox with the text "completed" appears next to it?

Private Sub Text45 ()
If Me.Text45 = "Test" THEN ... Thank you.
 
Yes, it is. You would just need to have the visible property of the check box set to true if the test is passed.

If it is a value that you wish to store in your database, then of course the checkbox would have to be linked to a field in a table somewhere for later reference. Your example above is not worded completely correctly for the after update function, though.... but perhaps you know that already.

Additionally, assuming you are using a form which looks at a record in your database, I would suggest the Form detail on current event should also carry out the test for the checkbox visibility, then the checkbox will show correctly if you move to a different record.
 
Is this correct?

Private Sub Text45_AfterUpdate()
If Me.Text45 = "Test" Then Check235

The visible property of Check235 is Yes

Do I need to do anything in Check235? How does it know to only be visible if the criteria is met? Thank you.
 
Try this:
Code:
Private Sub Text45_AfterUpdate()

If Me.Text45.value = "Test" Then
  Me.Check235.visible = true
else
  Me.Check235.visible = false
end if

End Sub
 

Users who are viewing this thread

Back
Top Bottom