I have three forms/menus
Each form/menu overlaps the other when selected.
Is there a way to hide the previous forms/menus not in present use?
I am afraid the user will click on a form that is in the back ground and not on the present form in use.
I have three forms/menus
Each form/menu overlaps the other when selected.
Is there a way to hide the previous forms/menus not in present use?
I am afraid the user will click on a form that is in the back ground and not on the present form in use.
I think and normally I use some movements like when that form open close the other using the properties inside of Events, like when open this close that or vice-versa.
Using Docmd.close acform....
Of course depends also of your database structure.
Try and good luck.
Regards,
Victor Hugo
I do not want to close the form as I need the data from it.
I only need to hide it. If I close it the inputted data will not be avilable in the report I am using.
Ok,
Sorry but for the 1st I didn't realize that is to hide.
Try this:
'------------------------------------------------------'In the main form:'------------------------------------------------------Private Sub cmdOpen3_Click() Me.Visible = False DoCmd.OpenForm "Form3", OpenArgs:=Me.NameEnd Sub'------------------------------------------------------'In the second form:'------------------------------------------------------Private Sub Form_Unload(Cancel As Integer) Forms(Me.OpenArgs).Visible = TrueEnd SubIt lets you avoid hard-coding a form's name, which means the second form can be opened by any other form in the application without having to worry about which form needs to be restored. The name of the form to be restored is in the OpenArgs property.
I am very very new to Access.
Where do I/How do I do what you suggest?
Your line above about closing the form. Is there a way just to minimize a specific form Something to do with "onlost"
How are you opening all of the various forms?
I have a Main Menu where the user enters all data that is required on tickets. They then select a button for <next window>.
The new menu form has several buttons for the specific time of year e.g. Halloween, Thanks giveing, New Years. They select the new years button.
The new years form has several buttons each a different ticket Report format design etc. The user selects and views each button untill they find the ticket they like the best. The fields on the ticket (report) are filled in from the data entered on the main Menu.
When happy the user verifies the number of tickets they need and select print.
There is code behind each button. Post some of that code and we'll show you how to hide the first form while showing the next form and then unhide the 1st form when the user is done with the next form.
Is this what you are looking for?
___________________________
End Sub
Private Sub Command48_Click()
On Error GoTo Err_Command48_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Event selector"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command48_Click:
Exit Sub
Err_Command48_Click:
MsgBox Err.Description
Resume Exit_Command48_Click
End Sub
Exactly! So try this code to see what happens:
Code:Private Sub Command48_Click() On Error GoTo Err_Command48_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "Event selector" Me.Visible = False DoCmd.OpenForm stDocName, , , stLinkCriteria, acDialog Me.Visible = True Exit_Command48_Click: Exit Sub Err_Command48_Click: MsgBox Err.Description Resume Exit_Command48_Click End Sub
Error Expression in argument 5 has an invalid value.
Where is argument 5?
------------------------------------------------
End Sub
Private Sub Command48_Click()
On Error GoTo Err_Command48_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Event selector"
Me.Visible = False
DoCmd.OpenForm stDocName, , , stLinkCriteria, acDialog
Me.Visible = True
Exit_Command48_Click:
Exit Sub
Err_Command48_Click:
MsgBox Err.Description
Resume Exit_Command48_Click
End Sub
My bos is on my back <wife> I will have to get back to you tomorrow.
Thanks for the help
Try:
DoCmd.OpenForm stDocName, , , , , acDialog
acDialog needs to be the 6th argument, not the 5th. My bad!
I made the change below.
When I click on the button it goes to the next form/menu as required.
When I click on a button to open a new form/Menu it opens in the back ground not as the front form. The form in fromt is inactive. I have to do a Ctl/Alt/Del to get Access to shut down.
Remember I am new to Access.
Wher is the 5th and 6th?
------------------------------------
End Sub
Private Sub Command48_Click()
On Error GoTo Err_Command48_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Event selector"
Me.Visible = False
DoCmd.OpenForm stDocName, , , , , acDialog
Me.Visible = True
Exit_Command48_Click:
Exit Sub
Err_Command48_Click:
MsgBox Err.Description
Resume Exit_Command48_Click
End Sub