Tab Cycle Current Record still goes to next record


C

Clddleopard

I have this code for a not in list event:
If MsgBox("Do you want to add " & [NewData] & "to the list?", vbYesNo, "Add
A Program") = vbYes Then
DoCmd.OpenForm "ProgramInfoPopup", acNormal, , , acFormAdd, acDialog, NewData
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If

The ProgramInfoPopup form has this code in its OnLoad Event:
Dim NewData As String
Me![ProgramName] = Me.OpenArgs

End Sub

When I close the Programinfopopup form after putting the new data in, the
original form advances to the next record EVEN THOUGH I have the Tab property
set to cycle Current Record.

What am I missing?
 
Ad

Advertisements

J

Jeanette Cunningham

This doesn't make sense.
What does your form do and what does your code do before user tries to add a
new record via the not in list event?
Is there somewhere that the record could get saved before a user tries to
add a new record via the not in list event?
Is the combo adding a new record to the same table instead of a related
table?
Do you have any code at all for the form's After Update event?

Jeanette Cunningham
 
Ad

Advertisements

C

Clddleopard

Jeanette Cunningham said:
This doesn't make sense.
What does your form do and what does your code do before user tries to add a
new record via the not in list event?
Is there somewhere that the record could get saved before a user tries to
add a new record via the not in list event?
Is the combo adding a new record to the same table instead of a related
table?
Do you have any code at all for the form's After Update event?

Jeanette Cunningham
Boy, your telling me that it doesn't make sense! :)
My form is a place to enter details about an event. The event is stored in
the "AppearanceRequest" table. One of the details about the event is the
name of the program. Program names and descriptions are stored in a separate
table, which is what the combo box is based on.
No code for the form's after update event.
After quickly reading your questions, it seemed to me like Access just
didn't recognize that I've changed the tab control property. When I got home,
I tried the exact same code in a different copy of the front end, and it
worked like it should. So, I guess I'll just take this front end back to work
with me and swap it out. Grrr. Aaarghhh.
But thanks for your reply!
 

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