requery

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Try:

If [Results] = "Sample Meets Standard" Then [Results] = "Sample Meets"
Me.Dirty = False
DoCmd.OpenReport "TotalSafetyD", acViewPreview, , strWhere
 
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
 
Back
Top