By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,871 Members | 2,575 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,871 IT Pros & Developers. It's quick & easy.

Return to same Record

P: n/a
I have a form on which i choose a record, then from this I open another form
for updating data. On closure of the second form I requery the data which
sets the first form back to the first record.
What I require is for the first form to return to the record I chose in
the first place, so the user can see the updated info.
Can anyone help

Thanks in advance
Dave
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Dave

What you need to do is put this in the form's VBA module at the top
before all Sub and Function declarations:

Dim CurrId As Long

Then put in the code where it opens the other form:

CurrId = Nz(Me.Recordset!Id, 0)

(substitute the name of the record's primary key for Id if necessary)

Then after the requery put this code:

Me.Recordset.FindFirst "Id = " & CurrId

This should do the trick

James Ellis-Jones
Regulus Systems Ltd
http://www.regulussystems.com

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.