Form not opening correctly

G

Guest

Hello,
I'm flummoxed about what's happening with this code. What I have is a tree
structure, and if the user picks a particular node, another form (a search
form) is supposed to open. The form does open, but it is behind the
existing form so the user can't tell that the second form is open. It
flashes for a second and then sometimes it minimizes. At other times it
flashes and just stays open behind the first form. Does anyone have an idea
as to why it's doing that?

Thanks very much for your help


Case "Root0"
vText = "Parties Appellant"
DoCmd.OpenForm "FrmTextSearch"
Form_frmTextSearch.SetFocus
Forms("FrmTextSearch").Move Left:=0, Top:=0, Width:=400, Height:=300
Form_frmTextSearch.txtLabel.SetFocus
Form_frmTextSearch.txtLabel.Text = "Enter information for " & vText
Form_frmTextSearch.List6.SetFocus
vstrSearch = Form_frmTextSearch.List6.Text
Form_frmTextSearch.RecordSource = "tblPatentCaseInformation"
vstrResult = InStr(1, vstrSearch, ",")

If Len(Trim(vstrSearch)) > 0 Then
If vstrResult > 0 Then
straryElement = Split(vstrSearch, ",")
intFinalNumber = UBound(straryElement)
End If
End If
End Select
 
S

Steve Schapel

Joanne,

I am not familiar with the Move method you are using, so I can't comment
on that. But the size arguments you are using should be in Twips.
Width of 400 and Height of 300 are very small. There are 567 twips per
centimetre, so you're talking here about a form taking the dimensions of
about 0.4 square centimetres.
 
G

Guest

Thank you very much for your response. It doesn't seem like the dimensions
are affecting the form at all. It does actually open and it is a normal
size. It just won't open in front of the existing form. I will change the
size, though and see if that makes a difference.
 
S

Steve Schapel

Joanne,

I guess another thing to check is whether the existing form has its
Modal property, or Popup property, set to Yes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top