DoCmd.Goto Nex Record

C

Clyde Ellingwood

I have form that that uses a tab control. The first tab
displays information from a table that is table for the
form. The second tab has a another form that uses another
table. There is enforced referential Integrity between
the two table. Its a one to many.

In the second page/Form there are self made naviagation
buttons using the DoCmd.GotoRecord, Add record, Last
Record, Next record etc. If you click Next Record, the
form moves to a new record and popluates the linked
field. Click again it displays its at the last record.

If I use Last Record, the recordset does not advance and
stays on the "Last Record".

Any ideas how I should handle this, I prefer the user not
going to a new record unless they Click New Record.

Hope this makes sense

Thanks

Clyde
 
M

MacDermott

Here's one approach:

Set the form's AllowAdditions property to No.
On your NewRecord button, set Me.AllowAdditions to True before moving to the
new record.
In your form's AfterUpdate event procedure, set Me.AllowAdditions to False.
Be sure you always save a record before moving to the next one.

HTH
- Turtle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top