The database I'm working on Has a form (FormA) which references another form (FormB) whether FormB is open or not.
This presents a minor problem because after the reference is made, access now thinks that FormB is open.
Here's some sample code:
Sub FormA_Load()
FormB.cbo1.setfocus
if isNull(FormB.cbo1) then
'do something crazy
else
'act normally
end if
end Sub[/SIZE]
So the "setFocus" call is what causes Access to think that FormB is open, but I've found that the setfocus needs to be called in order for the If block to execute properly.
Does anyone have any suggestions on how I can solve this? I'm looking for an Access solution, such as an "isOpen" function that can be used.
The only thing I can think of is to add a global flag to set whether FormB is really open on not.
Thanks in advance.
This presents a minor problem because after the reference is made, access now thinks that FormB is open.
Here's some sample code:
Sub FormA_Load()
FormB.cbo1.setfocus
if isNull(FormB.cbo1) then
'do something crazy
else
'act normally
end if
end Sub[/SIZE]
So the "setFocus" call is what causes Access to think that FormB is open, but I've found that the setfocus needs to be called in order for the If block to execute properly.
Does anyone have any suggestions on how I can solve this? I'm looking for an Access solution, such as an "isOpen" function that can be used.
The only thing I can think of is to add a global flag to set whether FormB is really open on not.
Thanks in advance.