add this code to the form being opened
If test = acFormDS Then <fieldname>.Locked = True Else: <fieldname>.Visible = False
Private Sub <Open_As_DataSheet_Button>_Click()
DoCmd.OpenForm "<form_name>", acFormDS
Private Sub <Open_As_Normal_Form_Button>_Click()
DoCmd.OpenForm "<form_name>", acNormal
to the calling buttons remember to set the <> bracket names to the ones you need
just make sure that the item at the top of the tab order isn't the item your hiding because you cant hide the active control
Last edited by m.timoney; 12-04-02 at 11:26.
Definition of a Beginner, Someone who doesn't know the rules.
Definition of an Expert, Someone who knows when to ignore the rules.