can you do something like the following code in access

VB Code:
  1. Private Sub Form_Load()
  2.    Dim xFrm As New frmExample
  3.  
  4.  
  5.    xFrm.Show vbModal
  6.  
  7.    'AllowAccess is a property
  8.    If Not xFrm.AllowAccess Then End
  9. End Sub


can something like this be done in MS Access?!?!?!!?
because i can get anything to work the way i want it to. I was hoping that it would work like regular VB...but i guess i'm wishing for to much.