Datasheet goes to first record

wrightyrx7

Registered User.
Local time
Today, 04:22
Joined
Sep 4, 2014
Messages
104
Hi all,

I posted yesterday about getting some code to select a record on a datasheet HERE

This was because when i create or edit a record then close the form it goes back to the top of the datasheet. In my thread (above) MarkK kindly gave me some code, but told me this is not the Datasheets default behavior.

So rather than use the code I have set out to discover why my datasheet is doing this! Spent most of yesterday ripping my hair out so am now seeking help.

I have attached a sample of my database for you to look at. If you click on one of the Vacancy ref's it will open the data in the form.

However if you click 'SAVE and CLOSE' or 'CANCEL', you should see the datasheet selection goes to the first record.

Thanks in advance
Chris
 

Attachments

Try the attached database.

Thanks JHB, was it the embedded macro causing it?

If so its strange because i got the embedded macro from the NorthWind database (Customer List), and when the customer form was closed in the Northwind Database the datasheet did NOT go back to the first record.

Would love to know what was causing it.

Thanks for sorting it out though :)
 
Didn't download/unzip JHB's attachment, and have no idea why you didn't see it do this in Northwind, but in the Macro for opening the form, you'll see the action Requery. This is what is causing the behavior you're seeing. Simply delete this action and save the Macro, which, I suspect, is what JHB did.

Linq ;0)>
 
Now that i have the Datasheet staying where it should, when someone Save's and Close's it does not update on the datesheet :(

Can i get any help with that?
 
By me the datasheet does update, so be more specific how to reproduce the fault you get.
 

Users who are viewing this thread

Back
Top Bottom