Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

me.Requery

Status
Not open for further replies.

AT76

Technical User
Apr 14, 2005
460
US
Hi,

I'm working on and app that when gets to line "me.Requery" its supposed to jump to the next recordset and then go to a Subroutine called: Private Sub Form_Current

This was the way it has always worked. However currently it stays in the same record always and does not procede to the next.

Could someone help me figure out what exactly me.Requery does and how can I find out what it calls.

Thank you in advance!
 
Taken from help files:

The Requery method updates the data underlying a form or control to reflect records that are new to or deleted from the record source since it was last queried.

-Reruns the query on which the form or control is based.

-Displays any new or changed records or removes deleted records from the table on which the form or control is based.

-Updates records displayed based on any changes to the Filter property of the form

Basically just refreshes your form's recordsource and displays the updated data on your forms control boxes, list boxes, OLE objects, etc.


~Melagan
______
"It's never too late to become what you might have been.
 
Thank you Melagan. I guess I'm trying to figure out why it worked before but now it doesn't. Like I mentioned before it moved the pointer to the next recorset. Now it just keeps pointing to the first record. Any ideas?

Thank you.
 
Here's the code:

Private Sub Command302_Click()

On Error GoTo mcr_Done_Err

DoCmd.SetWarnings False
DoCmd.OpenQuery "QRY_AppendPlnrLog", acNormal, acEdit
'
If (Some Criteria)
Do this...
Else
Me.Requery
End If

DoCmd.SetWarnings True

mcr_Done_Exit:
Exit Sub

mcr_Done_Err:
MsgBox Error$
Resume mcr_Done_Exit
End Sub

Could someone suggest another way of doing this? It seems that all the code cares about is going to the next record.
This code is behind form: "FRM_Main".

Thank you!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top