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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't go to specified record

Status
Not open for further replies.

cochise

Technical User
Mar 27, 2001
171
US
On a form I have a clear button that nulls all fields. However when trying to perform another operation after clearing fields I often get the following error message: 'can't go to specified record'. After pressing the escape key, the problem seems to be solved, however, I do not want my users to have to do this. Any thoughts on what might be the problem?
 
My first question would be why do you want to "nulls all fields" in a form tied to a table? Are you trying to add a new record?

Missinglinq

"It's got to be the going,
not the getting there that's good!"
-Harry Chapin
 
Sometimes when a user starts to enter a record, he may need to clear all fields and startover. I thought the best way to do this would be to null all the fields. I guess I could just delete the record, but was curious what was actually happening.
 
It sounds as if you're using the form to a record, and you're trying to clear all the fields to let them start over.

Once the user begins entering data into the "new" record, an actual record is created. The record is in a pending state while they're entering the data. You can see this in the icon on the record selector bar - it changes to a pencil whenever the pending state is in effect.

If you save the record, the pending state is cleared. It is also cleared if you press Escape, or call the form's Undo method. But if you just change fields to Null, the pending state persists. Again, you can see this by looking at the record selector bar.

I believe you're getting the error because whatever operation it is you're trying to do isn't allowed when a record update is pending. Instead of setting all the fields to Null, you probably need to call Me.Undo to clear the pending state.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top