Open Forms without popping up a new window

Graphfixz

New member
Local time
Today, 16:10
Joined
Dec 5, 2003
Messages
5
HI Guys,

I have a form with links on the left hand side that open forms inside a subform. The forms that open inside the subform open other forms.

It all works however, when you open a form from inside the subform the forms open in a new window. Is it possible to open a form inside a subform without openning a new window?

Thanks in Advance
 
Don't know the answer to this one, because I have never tried it but what about this:

Create subforms for all of the forms and then using vba set the visible property to show or hide the forms you want to show, this could be triggerred from cmd button or whatever.

The only thing is that the forms will be hidden(open) in the db, not sure if this is the right way to do it.

Purely a suggestion.

Hope this helps

Andy
 
Is it possible to open a form inside a subform without openning a new window?

Sure! The space for the "new window" with a blank subform, open a new form in the subform by changing the sourceobject of the blank subform. The "new form," must of cource be sized properly or have scroll bars.

I use

Me!sfrmDetail.SourceObject = sfrmName

where "sfrmDetail" is the subform (not a subsubform) and sfrmName contains the name of the new subform.

I use this techinque to open "subforms" based upon values set by 3 combo boxes (Category, sub-Category and sub-sub-Category). it works very well and fast.
 
Hi llkhoutx,

Any chance of attaching a working example??
 
Private Sub cmdEditFieldSize_Click()
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim sName As String
Dim icnt As Long
Dim sSQL As String

Set db = CurrentDb
icnt = 0
For Each tdf In db.TableDefs
sName = tdf.Name
If left(sName, 3) <> "tbP" Then GoTo Jump_100
icnt = icnt + 1
Debug.Print icnt & " " & tdf.Name
sSQL = "ALTER TABLE [" & sName & "] ALTER COLUMN [" & "sDescSummary" & _
"] Text (" & 255 & ")"
db.Execute sSQL
Jump_100:
Next
End Sub


It ain't elegant, but it works to change a text field's length to 255 characters.
 
so I would should change the follwoing:

Code:
Private Sub lstCompanies_DblClick(Cancel As Integer)
    
    DoCmd.OpenForm "frmEditAirport", acNormal, , "code = '" & Me.lstCompanies & "'"
    
End Sub

with

Code:
Private Sub lstCompanies_DblClick(Cancel As Integer)
    

Me!subfrmAdmin.SourceObject = frmEditAirport, acNormal, , "code = '" & Me.lstCompanies & "'"


    
End Sub


?!?!?!
 
Last edited:

Users who are viewing this thread

Back
Top Bottom