D
Dudley
I have five forms in Access 2000 which each have four command buttons to open
the other four with code e,g,
Private Sub Command7_Click()
Dim stdocname As String
Dim stlinkcriteria As String
stdocname = "Director"
stlinkcriteria = "[EnvelopeNumber]=" & Me![EnvelopeNumber]
DoCmd.OpenForm stdocname, , , stlinkcriteria
DoCmd.Close acForm, "Subscriber", acSaveYes
End Sub
These all work fine except for one on one form which only works if the last
line to close the old form is left out. I have tried deleting and copying
from another button's code, and deleting and writing from scratch, but I
always get the same problem, and only on trying to open the RegisteredOffice
form from the Subscriber form. The RegisteredOffice form has the parent table
only and the other four have sub-forms. Can anyone suggest a possible reason
and solution?
Thanks
Dudley
the other four with code e,g,
Private Sub Command7_Click()
Dim stdocname As String
Dim stlinkcriteria As String
stdocname = "Director"
stlinkcriteria = "[EnvelopeNumber]=" & Me![EnvelopeNumber]
DoCmd.OpenForm stdocname, , , stlinkcriteria
DoCmd.Close acForm, "Subscriber", acSaveYes
End Sub
These all work fine except for one on one form which only works if the last
line to close the old form is left out. I have tried deleting and copying
from another button's code, and deleting and writing from scratch, but I
always get the same problem, and only on trying to open the RegisteredOffice
form from the Subscriber form. The RegisteredOffice form has the parent table
only and the other four have sub-forms. Can anyone suggest a possible reason
and solution?
Thanks
Dudley