Need a way out of catch-22

G

Guest

I have tblPerson, one-to-many linked with tblVersion, relationship integrity enforced
frmAddPerson creates a new person, then opens frmAddVersion to create the requred version record
When frmAddVersion closes, it says the new person is not there and it can't add the record
frmAddPerson is closed

Private Sub cmdAddPerson_Click(
On Error GoTo Err_cmdAddPerson_Clic
Dim stDocName As Strin
Dim stLinkCriteria As Strin
DoCmd.Close 'frmAddPerson is the default, and it does clos
stDocName = "frmAddVersion
DoCmd.OpenForm stDocName, , , stLinkCriteri
Exit_cmdAddPerson_Click
 
J

Jonathan Parminter

-----Original Message-----
I have tblPerson, one-to-many linked with tblVersion,
relationship integrity enforced.
frmAddPerson creates a new person, then opens
frmAddVersion to create the requred version record.
When frmAddVersion closes, it says the new person is not
there and it can't add the record.
frmAddPerson is closed.

Private Sub cmdAddPerson_Click()
On Error GoTo Err_cmdAddPerson_Click
Dim stDocName As String
Dim stLinkCriteria As String
DoCmd.Close 'frmAddPerson is the default, and it does close
stDocName = "frmAddVersion"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdAddPerson_Click:

.
Hi Desert Bear,

the record or amendments does not exist until it is saved.
Try inserting
docmd.runcommand acCmdSaveRecord
before opening form

Luck
Jonathan
 

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