M
Mark Kubicki
I have this code (below) which opens a pop-up form and then after the form
is closed should run 2 sub-routines followed by a requery of the current
form; however, what seems to be happening is that the subs and requery
happen as soonas the form is opened and not when it is closed...
I can see how this makes sense, since afterall, it is doing what I am
telling it to do (open the form and then do something else); but this is not
how I need it to behave...
My hunch is that i need to move the subs and requery to the close event on
the pop-up?
Any suggestions would be greatly appreciated,
(the 2 subs are used elsewhere in the project, and i would rather not modify
them -but if I have to, i would...)
many thanks in advance,
mark
Private Sub cmdAddCutsToMaster_Click()
On Error GoTo Err_cmdAddCutsToMaster_Click
Dim stDocName As String
Dim stLinkCriteria As String
strOpenArgs = "true" & "~" & Me![Manufacturer] & "~" & Me![CatalogNo]
strDocName = "FixtureCatalogesPages"
strLinkCriteria = "[Manufacturer] = '" & Me.Manufacturer & "' AND
[CatalogNumber] = '" & Me.CatalogNo & "'"
DoCmd.OpenForm strDocName, , , strLinkCriteria, , , strOpenArgs
Call DoSQLDeleteCatalogBaseSheets(Me)
Call DoSQLAddCatalogBaseSheets(Me)
Forms![frmSpec].chldFixtureCuts.Requery
is closed should run 2 sub-routines followed by a requery of the current
form; however, what seems to be happening is that the subs and requery
happen as soonas the form is opened and not when it is closed...
I can see how this makes sense, since afterall, it is doing what I am
telling it to do (open the form and then do something else); but this is not
how I need it to behave...
My hunch is that i need to move the subs and requery to the close event on
the pop-up?
Any suggestions would be greatly appreciated,
(the 2 subs are used elsewhere in the project, and i would rather not modify
them -but if I have to, i would...)
many thanks in advance,
mark
Private Sub cmdAddCutsToMaster_Click()
On Error GoTo Err_cmdAddCutsToMaster_Click
Dim stDocName As String
Dim stLinkCriteria As String
strOpenArgs = "true" & "~" & Me![Manufacturer] & "~" & Me![CatalogNo]
strDocName = "FixtureCatalogesPages"
strLinkCriteria = "[Manufacturer] = '" & Me.Manufacturer & "' AND
[CatalogNumber] = '" & Me.CatalogNo & "'"
DoCmd.OpenForm strDocName, , , strLinkCriteria, , , strOpenArgs
Call DoSQLDeleteCatalogBaseSheets(Me)
Call DoSQLAddCatalogBaseSheets(Me)
Forms![frmSpec].chldFixtureCuts.Requery