Update unbound box on form...help needed

F

Fuzzy Logic

I have a form with a calculated unbound box based on a query. If I check a
record on the form for yes to no (or vice versa) this calculated field
should be updated but isn't. What's the proper way to get this to happen?

TIA
 
J

John Vinson

I have a form with a calculated unbound box based on a query. If I check a
record on the form for yes to no (or vice versa) this calculated field
should be updated but isn't. What's the proper way to get this to happen?

TIA

Requery the control in the AfterUpdate event of the yes/no field.

John W. Vinson[MVP]
 
F

Fuzzy Logic

Requery the control in the AfterUpdate event of the yes/no field.

I'm not sure what you mean by 'requery the control'? I know where the
AfterUpdate event is for the field but I'm not sure what's supposed to go
into it?
 
J

John Vinson

I'm not sure what you mean by 'requery the control'? I know where the
AfterUpdate event is for the field but I'm not sure what's supposed to go
into it?

Click on the ... icon by the AfterUpdate event and choose "Code
Builder". Access will give you the Sub and End Sub lines below; just
add one more line:

Private Sub controlname_AfterUpdate()
Me!othercontrolname.Requery
End Sub

using your own control names of course.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top