Form Wont Close

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

Whats Stopping the "AddItems_QBF Form from closing....Its just staying
there behind the form that it opens, The Parent Form.

Public Function QBFDoHide(frm As Form)

Dim strSQL As String
Dim strParent As String


strParent = adhGetItem(frm.Tag, "Parent") & vbNullString

strSQL = DoQBF(frm.Name, False)

If Len(strParent) > 0 Then
DoCmd.OpenForm FormName:=strParent, View:=acNormal,
WhereCondition:=strSQL
End If
DoCmd.Close , "AddItems_QBF"


End Function

Thanks
DS
 
Try:

...
End If
DoEvents
DoCmd.Close acForm, "AddItems_QBF"

HTH
Van T. Dinh
MVP (Access)
 
you may want to expand the command to

Docmd.Close acform, "AddItems_QBF",acsaveyes

or

Docmd.Close acform, "AddItems_QBF",acsaveno
 
Alex said:
you may want to expand the command to

Docmd.Close acform, "AddItems_QBF",acsaveyes

or

Docmd.Close acform, "AddItems_QBF",acsaveno
Yipee! It works I used

DoEvents
DoCmd.Close acForm, "AddItems_QBF",acSaveNo

Thank you!

PS,
Alex, I got the whole thing working now. The QBF, I found something
helpful on the Microsoft website. It uses DOA, which I dont quite
understand yet but I will....one day.
Thank you, all, everyone.
DS
 
Back
Top