View Full Version : Really Weird Unexplainable Error


saross
08-05-2003, 07:43 AM
Hi, I've got a really strange problem I can't solve with one of my makros. Will try to explain best I can:

From frmSelectContact makro behind a button opens dialog frmInputSubUser1.
Having selected an item from the combo list box in the latter form, makro behind a button as follows:

OpenForm frmAddSubUserToOrg
SetValue (passes orgID from frmInputSubUser1 to frmAddUserToOrg)
Close frmInputSubUser1
Close frmSelectContact
Maximise

The thing is, I get an error message saying it can't find frmSelectContact. So I took that line out, and frmSelctContact stays on top of the others. Is there something really obvious I'm doing wrong?
:confused:

jeremie_ingram
08-11-2003, 08:00 AM
Could you try to convert the macro to vba and try to run it as a module or as code behind a cmd button?

There have been time when I encounter items such as this that the VBA conversion either rectifies/elieviates the problem, and it will also give you a greater measure of dealing with whats actually going wrong.

saross
08-11-2003, 08:02 AM
Hi. I'm using the DoCmd. function. There's a long thread about this in the General section where I got some replies but I still haven't solved the problem so I'd be grateful for any advice...?
:confused:

jeremie_ingram
08-11-2003, 08:04 AM
Could you try the DoCmd.Setfocus on the form that came up as an error, the the DoCmd.close to close it, then DoCmd.setfocus to reset it to the form in question. Sometimes when you attempt to manipulate/close and item, it requires that it have focus first.