DB Questions..

  • Thread starter axm0035 via AccessMonster.com
  • Start date
A

axm0035 via AccessMonster.com

Hello,
1) Please how can i make sure that a subform must be filled if there are any
updates on the form?
2) Is it possible to put a password for a particular table or Macro?

Please i will appreciate it if you help me with this.
Thank you in advance.
 
J

Jack Leach

1) This is a bit tricky, generally people try to go about it with a
different design, but you may be able to use the unload event of the main
form to cancel it if no records are present in the subform's recordset...

Private Sub Form_Unload(Cancel As Integer)
If Me.SubControlName.Form.Recordset.Recordcount = 0 Then
MsgBox "Please enter detail records..."
Cancel = True
End If
End Sub


2) You can't (that I'm aware of) put a password on it, but you can
right-click the object name, select properties, and set it to hidden. With
tables at least, you can prefix them as "USys" to hide them (assuming that
you haven't turned off hide system objects in settings), but I'm not sure
this applies to macros or modules.

As an alternative (actually, rather than alternative, this is standardly the
"correct" way to do it), convert your file to an .mde (for versions 2003 and
before) or an .accde (versions 2007 and 10). This removes all code from the
user, and this would be the distributable copy.


hth


--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
A

axm0035 via AccessMonster.com

Thank you very much Jack.

Jack said:
1) This is a bit tricky, generally people try to go about it with a
different design, but you may be able to use the unload event of the main
form to cancel it if no records are present in the subform's recordset...

Private Sub Form_Unload(Cancel As Integer)
If Me.SubControlName.Form.Recordset.Recordcount = 0 Then
MsgBox "Please enter detail records..."
Cancel = True
End If
End Sub

2) You can't (that I'm aware of) put a password on it, but you can
right-click the object name, select properties, and set it to hidden. With
tables at least, you can prefix them as "USys" to hide them (assuming that
you haven't turned off hide system objects in settings), but I'm not sure
this applies to macros or modules.

As an alternative (actually, rather than alternative, this is standardly the
"correct" way to do it), convert your file to an .mde (for versions 2003 and
before) or an .accde (versions 2007 and 10). This removes all code from the
user, and this would be the distributable copy.

hth
Hello,
1) Please how can i make sure that a subform must be filled if there are any
[quoted text clipped - 3 lines]
Please i will appreciate it if you help me with this.
Thank you in advance.
 

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