Ok. here is the problem. Im creating an interface for access, and I would like to create an array to store forms in. This is so I can use the array with an integer as a stack. This will then let me use the stack to store the order that forms were opened in so I can then undo them in order as the user closes them, allowing them to just close a form to get to the last one they opened.
Any hints would be appreciated, currently got some code like this which doesnt work
Any hints would be appreciated, currently got some code like this which doesnt work
Code:
Dim LastForm(1 To 10) As Forms
Dim currentForm As Integer
Public Sub SetLastForm(fr As Forms)
currentForm = currentForm + 1
LastForm(currentForm) = fr
End Sub
Public Sub initialise()
currentForm = 0
End Sub
Public Function GetLastForm() As Forms
GetLastForm = LastForm(currentForm)
currentForm = currentForm - 1
End Function