requery

R

rml

I have the following code in a command button. If I do not put the requery
line, the report does not show the "Sample Meets" on it. The requery works
but throws my form back to record one. Is there something else I can use to
refresh the record or I'm I doing something wrong?

Thanks.


If [Results] = "Sample Meets Standard" Then [Results] = "Sample Meets"
DoCmd.Requery
DoCmd.OpenReport "TotalSafetyD", acViewPreview, , strWhere
 
O

Ofer Cohen

Try:

If [Results] = "Sample Meets Standard" Then [Results] = "Sample Meets"
Me.Dirty = False
DoCmd.OpenReport "TotalSafetyD", acViewPreview, , strWhere
 
R

rml

I will try that. What does Me.Dirty = False do?

Thanks for your help.

Ofer Cohen said:
Try:

If [Results] = "Sample Meets Standard" Then [Results] = "Sample Meets"
Me.Dirty = False
DoCmd.OpenReport "TotalSafetyD", acViewPreview, , strWhere

--
Good Luck
BS"D


rml said:
I have the following code in a command button. If I do not put the requery
line, the report does not show the "Sample Meets" on it. The requery works
but throws my form back to record one. Is there something else I can use to
refresh the record or I'm I doing something wrong?

Thanks.


If [Results] = "Sample Meets Standard" Then [Results] = "Sample Meets"
DoCmd.Requery
DoCmd.OpenReport "TotalSafetyD", acViewPreview, , strWhere
 

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