by using form.enabled = false I can disable the whole form, however it, and especially its controls, are not marked grey.
how can i accomplish that the form and all its controls are disabled and marked grey?
a bit of a noob question this, but that procedure seems to be a never ending loop. Couldn't you just call each control by name and disable them? You could then change the colour of them to grey (including the labels).
If you wanted to be really flash i suppose there is a way to get them removed from the Tab order list too, so that way there's no chance of the users getting to select them until they are enabled.
Here is a function I use to enable or disable a control on a form
Function HideAnyControl(thisForm As String, thisControl As String, lHide As Boolean)
Dim frm As Form
Dim Ctrl As Control
Set frm = Forms(thisForm)
If thisControl = "TextBox" Then
For Each Ctrl In frm.Controls
If Ctrl.ControlType = acTextBox Then
If lHide Then
Ctrl.Visible = False
Ctrl.Visible = True