Jump to content
Macro Express Forums

MS Access


JoesB&G

Recommended Posts

I'm brand new, but did search the forum before asking this.

 

I launch an Access database and then run a routine. Sometimes one window will open, sometimes a msgbox will appear. This is by design. I am trying to tell MacroExpress that if the msgbox appears to do something. My problem is I can't seem to capture the msgbox window. It isn't a saved form that has a name....it's only a msgbox. Any thought?

Link to comment
Share on other sites

Maybe you can try a reverse approach using the If Window Not on Top command. If your window is not on top, then this should mean that the msgbox is on top. Take the logic from there.

 

Or you may be able to use the Window Controls commands to save the msgbox to a control variable. Then use the If Control commands for the logic.

Link to comment
Share on other sites

Do you have access to the Access application, so you could give the message box a title?

 

Or, along the lines that Stan suggested, try to capture the message box control, then check the text in the control. I'm not at all sure this will work, but something like this:

 

If mainwindow not active

Capture Control | Control Focused

Variable Get Control Text to T1

If T1 = "message box text"

Do Something

End If

End If

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...