Changed data

J

Jean-Paul

Hi,
In a subform, when I uncheck a checkbox following code is run:

If Me!Bezoeken = False Then
Me!Datum_bezoek = ""
endif

It works but in the table, the changing is visible only when the form is
closed.
When I place a breakpoint and check the data, nothing seems to be
changed. When I close the form, I have the feeling, only THEN the actual
data is deleted...
How to invoke it immediatly...

Thanks
JP
 
J

Jean-Paul

This is the code:

Private Sub bezoeken_Click()
If Me!Bezoeken = False Then
Forms!Bezochten!nr_bedrijf = Me!nr
Me!Datum_bezoek = ""
End If
End Sub

It is a checkbox on a continuous form.
When I change the checkbox and it becomes "True" I actually see the
value of "Bezoeken" to become empty.
Then I open a second form while the first one remains open.
Here I still can see value of the date-field "Bezoeken".
It's only after closing both forms t"Bezoeken" becomes empty.

I think it is a "timing" problem...

Hope you can help.
Thanks
 
B

bhicks11 via AccessMonster.com

Try sticking a requery command in there.

Bonnie
http://www.dataplus-svc.com

Jean-Paul said:
This is the code:

Private Sub bezoeken_Click()
If Me!Bezoeken = False Then
Forms!Bezochten!nr_bedrijf = Me!nr
Me!Datum_bezoek = ""
End If
End Sub

It is a checkbox on a continuous form.
When I change the checkbox and it becomes "True" I actually see the
value of "Bezoeken" to become empty.
Then I open a second form while the first one remains open.
Here I still can see value of the date-field "Bezoeken".
It's only after closing both forms t"Bezoeken" becomes empty.

I think it is a "timing" problem...

Hope you can help.
Thanks
What event are you are you running that from?
[quoted text clipped - 17 lines]
 
J

Jean-Paul

I added:

DoCmd.RunCommand acCmdSaveRecord

Problem solved...
Thanks
Try sticking a requery command in there.

Bonnie
http://www.dataplus-svc.com

Jean-Paul said:
This is the code:

Private Sub bezoeken_Click()
If Me!Bezoeken = False Then
Forms!Bezochten!nr_bedrijf = Me!nr
Me!Datum_bezoek = ""
End If
End Sub

It is a checkbox on a continuous form.
When I change the checkbox and it becomes "True" I actually see the
value of "Bezoeken" to become empty.
Then I open a second form while the first one remains open.
Here I still can see value of the date-field "Bezoeken".
It's only after closing both forms t"Bezoeken" becomes empty.

I think it is a "timing" problem...

Hope you can help.
Thanks
What event are you are you running that from?
[quoted text clipped - 17 lines]
Thanks
JP
 

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