Re: Different results with opening form with docmd.
- From: "Ken Snell \(MVP\)" <kthsneisllis9@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Nov 2006 15:16:15 -0500
Is frmDuplicateValue actually being closed when you're done with it, or is
it just being made invisible? Your code suggests the latter case, which is
fine, so long as you're sure that the form is always closed by the code when
you're done reading the value from it. Look carefully at your code's logic
to be sure that your code will always close the form no matter what. The
behavior that you describe is typical of the form not being closed and
remaining in invisible (hidden) mode when the code is run again the next
time.
--
Ken Snell
<MS ACCESS MVP>
"Carol G" <cgeddes@xxxxxxx> wrote in message
news:wTm9h.356566$5R2.293013@xxxxxxxxxxxx
I am opening a dialog form to get some information. Then closing the dialog
form when done.
The problem I am having is that the sometimes I push the command button to
open the form it runs through the if is loaded section without giving me
the
opportunity to fill in the choices on the dialog form. If I push the
command
button again, it operates correctly and lets the user enter choices.
Thanks,
Carol
Code snippet..
If strNameList <> "" Then
DoCmd.OpenForm "frmDuplicateValue", OpenArgs:=strNameList,
WindowMode:=acDialog
'Stop here and wait until form goes away
If IsLoaded("frmDuplicateValue") Then
If Forms("frmDuplicateValue").Tag <> "New" Then
strDecision = Forms("frmDuplicateValue").Tag
Debug.Print "Will update " & strDecision
DoCmd.Close acForm, "frmDuplicateValue"
'Enter Code to update contact here
MsgBox "Must place code to update here."
Else
.
- Follow-Ups:
- Re: Different results with opening form with docmd.
- From: Carol G
- Re: Different results with opening form with docmd.
- References:
- Different results with opening form with docmd.
- From: Carol G
- Different results with opening form with docmd.
- Prev by Date: Re: moving a main form and subform to a specific subform record
- Next by Date: Re: Different results with opening form with docmd.
- Previous by thread: Different results with opening form with docmd.
- Next by thread: Re: Different results with opening form with docmd.
- Index(es):