By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,510 Members | 1,430 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,510 IT Pros & Developers. It's quick & easy.

Disable the Continuous Form or RecordSelector

P: n/a
I have a Continuous SubForm on a TabPage.
Above the ContinuousForm is a "box of fields" I use to display the
entire record that the focus is on. When one points to a record using
the RecordSelector, it has the desired effect of displaying all the
fields for one record.

I use buttons New/Edit/Del, and changes are made in the box.

I need to Disable the ContinuousForm while changes are taking place in
the box. If I set the RecordSelectors to False, this solves my
problem, but the ContinuousForm and the Box get annoyingly shifted to
the left, to fill the displaced RecordSelector area. When
done, the RecordSelector is set to True and everything annoyingly gets
shifted back.
- Any way to stop the shift when RecordSelector False???

I also tried Me.Detail.Visible = False, but this has the undesired
effect of removing the ContinuousForm display.

-The User can select a record by clicking on the RecordSelector or
clicking on a field on the ContinuousForm. Any way to prevent this
when I have them in the "box" editing ???

Thanks
Greg

Feb 28 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
if i understand your setup correctly, the continuous form is subform, and
the "edit" controls are on the main form, above the subform. if this is
correct, then try setting the subform control's Enabled property to False to
prevent subform changes.

hth
<Ap******@gmail.comwrote in message
news:11**********************@k78g2000cwa.googlegr oups.com...
I have a Continuous SubForm on a TabPage.
Above the ContinuousForm is a "box of fields" I use to display the
entire record that the focus is on. When one points to a record using
the RecordSelector, it has the desired effect of displaying all the
fields for one record.

I use buttons New/Edit/Del, and changes are made in the box.

I need to Disable the ContinuousForm while changes are taking place in
the box. If I set the RecordSelectors to False, this solves my
problem, but the ContinuousForm and the Box get annoyingly shifted to
the left, to fill the displaced RecordSelector area. When
done, the RecordSelector is set to True and everything annoyingly gets
shifted back.
- Any way to stop the shift when RecordSelector False???

I also tried Me.Detail.Visible = False, but this has the undesired
effect of removing the ContinuousForm display.

-The User can select a record by clicking on the RecordSelector or
clicking on a field on the ContinuousForm. Any way to prevent this
when I have them in the "box" editing ???

Thanks
Greg

Feb 28 '07 #2

P: n/a
On Feb 27, 11:19 pm, "tina" <nos...@address.comwrote:
if i understand your setup correctly, the continuous form is subform, and
the "edit" controls are on the main form, above the subform. if this is
correct, then try setting the subform control's Enabled property to False to
prevent subform changes.
My ContinuousForm and the "BOX" for edit I mentioned both live in the
subform control,
so this won't work because I need to keep the focus off of the subform
and allow the Edit in the "BOX". I'm also trying to avoid the GrayOut
look that Enabled=False would cause.

How would I test for a change of record in the OnCurrent Event or
elsewhere, so that I could somehow preempt that change before it
happens. Like OnExit in a field ???

Feb 28 '07 #3

P: n/a
comments inline.

<Ap******@gmail.comwrote in message
news:11**********************@t69g2000cwt.googlegr oups.com...
On Feb 27, 11:19 pm, "tina" <nos...@address.comwrote:
if i understand your setup correctly, the continuous form is subform,
and
the "edit" controls are on the main form, above the subform. if this is
correct, then try setting the subform control's Enabled property to
False to
prevent subform changes.

My ContinuousForm and the "BOX" for edit I mentioned both live in the
subform control,
okay
so this won't work because I need to keep the focus off of the subform
what? do you have a main form with a subform in it, and another subform
nested in the first subform? or do you mean that the "box" of edit controls
are in the Header section of the subform? if yes to the latter, then you
can't keep the "focus" off the subform - you're in it. (though strictly
speaking, a form object cannot receive the focus, unless there are no
enabled controls on the form.) if we need to take this thread further after
i answer your question below, then you'll need to clarify your
form/subform(s) structure.
and allow the Edit in the "BOX". I'm also trying to avoid the GrayOut
look that Enabled=False would cause.
just FYI: a subform control is not "grayed out" when disabled - only its'
label becomes grayed out. if you don't use a label with the subform control,
there's no visual indication that it's grayed out or not.
>
How would I test for a change of record in the OnCurrent Event or
elsewhere, so that I could somehow preempt that change before it
happens. Like OnExit in a field ???
a control's BeforeUpdate event runs before the control loses the focus, but
only when the value in the control has been edited; a form's BeforeUpdate
event runs before the record is written to disk, but only when a value in a
field in the record has been edited. also, when a value in a field in the
record has been edited, the form's Dirty property is changed to True; you
can test for that at any time, as

If Me.Dirty = True Then...

so that gives you three possibilities to try, that may help you accomplish
your goal.

hth
Feb 28 '07 #4

P: n/a
Ap******@gmail.com wrote:
My ContinuousForm and the "BOX" for edit I mentioned both live in the
subform control,
The put the box out of the sub form and into the main tab. Lock the
subform when you are in edit mode.

This is a pretty standard approach. It sounds like you're
overcomplicating things.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Feb 28 '07 #5

P: n/a
ThankYou Tina and Tim for all the options.

This worked best for me in the scope of my app.
Private Sub Form_BeforeUpdate(Cancel As Integer)
'************************************************* *****
'FORM: Keep Focus on my dirty Rec
If (blnFocusRec) Then "Make global variable False when done
Cancel = True
End If
End Sub
Thanks Again
Greg

Feb 28 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.