databasedonr
Registered User.
- Local time
- Today, 14:01
- Joined
- Feb 13, 2003
- Messages
- 163
How can I tell which form is open programmatically?
I have a form used to update records - and these records can be accessed from one of two forms. After the update process has run in my code, I want to send the user back to the form from which they came - but I don't know how to identify that.
Here's an example: I have a BrowseRecord and a FindRecord form. From either form, I have an Edit Record button that opens a EditRecord form. Once the record is edited, I want to return the user to the form they used to get to the edit form. As I am leaving the intial form open, I thought I could do something like
If Form_BrowseRecord = "Open" Then
Form_BrowseRecord.SetFocus
Else
Form_FindRecord.SetFocus
But I am not sure how to identify which form is open. I've waded through the Object Browser etc. but can't find the answer....
My apologies if this should rather be in the VBA forum.
Thanks in advance.
Don
I have a form used to update records - and these records can be accessed from one of two forms. After the update process has run in my code, I want to send the user back to the form from which they came - but I don't know how to identify that.
Here's an example: I have a BrowseRecord and a FindRecord form. From either form, I have an Edit Record button that opens a EditRecord form. Once the record is edited, I want to return the user to the form they used to get to the edit form. As I am leaving the intial form open, I thought I could do something like
If Form_BrowseRecord = "Open" Then
Form_BrowseRecord.SetFocus
Else
Form_FindRecord.SetFocus
But I am not sure how to identify which form is open. I've waded through the Object Browser etc. but can't find the answer....
My apologies if this should rather be in the VBA forum.
Thanks in advance.
Don