Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271

    Red face Unanswered: My form locks up? I think because of acDialog sets to modal?

    Below is the code I have from my combo box. When I try to go back to Form A... the computer locks up!
    Please help

    Form A

    Private Sub BillToID_NotInList(NewData As String, Response As Integer)
    If MsgBox("The Company " & NewData & " you entered, does not exist yet." & vbCrLf & vbCrLf & "Do You wish to add it?", vbQuestion + vbYesNo) = vbYes Then
    DoCmd.OpenForm "FrmEnterCompany", acNormal, , , acFormAdd, acDialog, NewData
    Response = acDataErrAdded
    Else
    Response = acDataErrContinue
    End If
    End Sub

    Form B

    Private Sub Form_Load()
    If Not IsNull(Me.OpenArgs) Then
    Me!Customer = Me.OpenArgs
    End If
    End Sub
    Gotta to do some code

  2. #2
    Join Date
    Feb 2004
    Posts
    142
    You have to either close form b or formb.modal = false if you want the form to stay open and navigate to FormA again. If formB is not set to popup = true then it can drop below formA if focus changes to another form and the machine will appear to be locked up. the modal property can be changed in code but popup cannot. If you need to control the Z order (which on top) then use a docmd.selectobject before navigating.
    KC

  3. #3
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271

    Pop up

    Neither of the forms I have setup are to be Popup or Modal. When I use acDialog, this forces both Popup and Modal to activate.

    I tried to change the Mode from acAdd to acEdit but I could not get it to open to a new record in my code. I have the code in my earlier message.

    Thank YOU!!!

    Surf
    Gotta to do some code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •