Need a way out of catch-22

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
-----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
 
Back
Top