[QUOTE=Bob Fitz;519116]I will try using the Continuous form following your suggestion.
Can you suggest the code of close button to close any form open on dashchild form because all my forms will open on dash child form only.
Thank you.
Not if that form is a "Split Form"Code:Can you suggest the code of close button to close any form open on dashchild form because all my forms will open on dash child form only.
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
I request you that leave the split form for now. Apart from this, if any other data entry form is opened on the dash child form, then what will be the coding of its close button.
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
This code closes the entire dashboard.
I tried by a code which solved the problem but the problem is that it is mandatory to create a button of this code on the dashboard whereas I want to create such buttons on every form which will be run on the dash child form.
Therefore this code needs amendment.
Code:Private Sub Command79_Click() Me.dashchild.SourceObject = "" Me.dashchild.SetFocus End Sub
Which form had a button that closed the dashboard with: Docmd.Close, " "
On which form is "Command79"
If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
Bob Fitzpatrick
Do yourself a HUGE favour.
Start giving your controls meaningful names. :-(
Command79 is not going to mean much to anyone a few months down the line.
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Be specific with commands:
DoCmd.Close acForm, "TheNameOfTheFormYouWantToClose"
This will only close the form you specify.
Apply it to all the forms you want to close, if they are already closed it won't raise an error.
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
You don't "close" a form that is used as a subform, you simply set the subform container control SourceObject to empty string.
What do you mean by "does not work"? The listbox SQL I suggested does work for me. Would need to Requery the listbox when navigating records. So in Dashboard Current event - Me.List32.Requery
Split form does work as a subform.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Hello June,
If it is not possible to close any of the forms on the subforms as per your and bob's instructions, I will make the necessary changes to my dashboard and remove the subforms and adopt the approach of opening each form in a new window as suggested by bob.
I have tried entering the code suggested by you in every way in the gray offer register but till now I am not getting success. Please check the attached file and tell me what mistake I am doing.
Thank you.
I'd say that you can't close that which is not open (loaded).
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
To clarify to the OP what is happening here, A subform is not loaded as a Form in the normal sense of a standard Form.
It is simply a control on a form.
This control happens to contain a form, but it can also hold and display a report or a query, so it can't be closed independently on its own.
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
Your attached file does not have a Dashboard just a single Split Form?
You can PM me if you need further help.
Good Reading https://docs.microsoft.com/en-gb/off...on-description