IsLoaded

  • Thread starter Thread starter Ivor Williams
  • Start date Start date
I

Ivor Williams

I have two forms in a database. On one of the forms (frmPO) is a combo box
(cboSupplier). On the other form (frmReqMat) is a command button (cmdPO).
When cmdPO is clicked, form frmPO is opened displaying only those records
for the currently selected supplier on form frmReqMat. When frmPO is opened
this way, I want to set the Visible property of cboSupplier to False. I've
tried to do this using the IsLoaded property in VBA, but I must be getting
the syntax wrong. Would appreciate some help.

Ivor
 
Ivor Williams said:
I have two forms in a database. On one of the forms (frmPO) is a
combo box (cboSupplier). On the other form (frmReqMat) is a command
button (cmdPO). When cmdPO is clicked, form frmPO is opened
displaying only those records for the currently selected supplier on
form frmReqMat. When frmPO is opened this way, I want to set the
Visible property of cboSupplier to False. I've tried to do this using
the IsLoaded property in VBA, but I must be getting the syntax wrong.
Would appreciate some help.

What syntax are you using? And what version of Access? In Access
2000+, you should be able to use something like this in the Open Event
of frmPO:

Private Sub Form_Open(Cancel As Integer)

If CurrentProject.AllForms("frmReqMat").IsLoaded = True Then
Me.cboSupplier.Visible = False
End If

End Sub
 
Back
Top