Re: Different results with opening form with docmd.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks,
I'll look at the whole code and see.
Carol
"Ken Snell (MVP)" <kthsneisllis9@xxxxxxxxxxxxxxxxxx> wrote in message
news:eEDX1wzDHHA.4208@xxxxxxxxxxxxxxxxxxxxxxx
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






.



Relevant Pages

  • Different results with opening form with docmd.
    ... Then closing the dialog ... The problem I am having is that the sometimes I push the command button to ... Debug.Print "Will update " & strDecision ...
    (microsoft.public.access.formscoding)
  • Re: Different results with opening form with docmd.
    ... Is frmDuplicateValue actually being closed when you're done with it, ... The problem I am having is that the sometimes I push the command button to ... Debug.Print "Will update " & strDecision ...
    (microsoft.public.access.formscoding)
  • Re: pushb assembler command in gas
    ... The pushw command works. ... to use the pushb command and it does not work. ... Can anyone tell me why a byte sized push in gas would not work (or ... instruction, as either a word or the CPU size [longword ...
    (comp.lang.asm.x86)
  • Re: Saving a single worksheet
    ... I used the script for Mil one sheet in Outlook object model. ... I am trying to apply this macro to a command button in the sheet. ... if I use display under the lines for OutMail will it stop at the point where I will have to push the send button for the message to go? ... > Private Sub CommandButton1_Click ...
    (microsoft.public.excel.programming)
  • Re: [opensuse] ipconfrig--where?
    ... Only true if you have an automatic transmission, you can actually push ... New coke was marketing, not engineering. ... Those users don't use command lines at all, ...
    (SuSE)