Re: Problem editing Data in form

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: NNlogistics (NNlogistics_at_discussions.microsoft.com)
Date: 01/21/05


Date: Fri, 21 Jan 2005 13:51:09 -0800

Thanks Penguin.
Sorry I didnt get back sooner. It has worked fine.

"Penguin" wrote:

> Try putting the DoCmd.Close after you open the other form and make
> sure you specify which form to close. Example: DoCmd.Close acForm,
> "MyForm"
>
> On Wed, 19 Jan 2005 11:03:03 -0800, "NNlogistics"
> <NNlogistics@discussions.microsoft.com> wrote:
>
> >I have created 2 forms. One I call subfrmSerialNumber, which is a Summary
> >form, the other frmRepair, is a detail. I use a query to feed the forms. I
> >have a cmd button on Summary, tied to the click event, that opens the detail
> >to the same data(record). The used the wizard to creat this
> >
> >I can't write to the Detail. I found that if I close the frmSummary, it
> >works. I would have thought the Wizard would have taken this into
> >consideration. I tried to close the frmSummary by adding a Docmd.Close to
> >the code used in that event. I get a error saying it cant find object???
> >(Maybe it thinks its closed already)
> >
> >I can also get it to work by setting no locks on fthe detail, but that
> >doesnt work well in this environment.
> >
> >Private Sub cmdOpensubfrmSNCheck_Click()
> >On Error GoTo Err_cmdOpensubfrmSNCheck_Click
> > DoCmd.Close
> > Dim stDocName As String
> > Dim stLinkCriteria As String
> >
> > stDocName = "frmRepair"
> >
> > stLinkCriteria = "[RMA]=" & "'" & Me![RMA] & "'"
> > DoCmd.OpenForm stDocName, , , stLinkCriteria
> >
> >Exit_cmdOpensubfrmSNCheck_Click:
> > Exit Sub
> >
> >Err_cmdOpensubfrmSNCheck_Click:
> > MsgBox Err.Description
> > Resume Exit_cmdOpensubfrmSNCheck_Click
> >
> >End Sub
> >
> >I hope this makes sense.
>
>


Quantcast