Continuous Form - Hiding control on the NewRecord line

Fuse3k

Registered User.
Local time
Yesterday, 21:33
Joined
Oct 24, 2007
Messages
74
Hello,

I have a continuous form and I want to hide certain controls on the New Record line because they don't apply (until after a record is saved). I figured I could trigger this using an event from the Detail section - I looked at the On_Paint event but I don't think that's what I'm looking for after reading the help description.

Thanks for your help

-Fuse
 
How would I do about doing that? What event will let me change the property of a control on the New Record line only?
 
You could do...
Code:
private sub form_current()
[COLOR="Green"]  'lock the text1 control on new records[/COLOR]
  me.text1.locked = me.newrecord
end sub
But note that any change you make to a control on a continuous form is applied to that control in ALL the detail sections of the form. So this code...
Code:
private sub form_current()
[COLOR="Green"]  'hide the text1 control on a new records[/COLOR]
  me.text1.visible = not me.newrecord
end sub
...hids ALL text1 controls when you move to a new record, even those for records that already exist.
 
note that the folowing settings are possible, using the locked, and enabled properties


locked=false, enabled = true - normal field
locked=true, enabled = true - can enter, but cant edit
locked=true, enabled = false - cannot interract at all
locked=false, enabled = false - grayed out

so each of the bottom 3 will work - it depends on which you want to use.

with a continuous form, all rows look the same ie so if you choose the grayed out method, it looks a bit stranfe, although you get used ot it quickly. it does give you a clear visible indication that a field is not available.
 

Users who are viewing this thread

Back
Top Bottom