Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / February 2007

Tip: Looking for answers? Try searching our database.

Disable the Continuous Form or RecordSelector

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ApexData@gmail.com - 28 Feb 2007 03:28 GMT
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
tina - 28 Feb 2007 04:19 GMT
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

> I have a Continuous SubForm  on a TabPage.
> Above the ContinuousForm is a "box of fields" I use to display the
[quoted text clipped - 21 lines]
> Thanks
> Greg
ApexData@gmail.com - 28 Feb 2007 04:36 GMT
> 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 ???
tina - 28 Feb 2007 04:51 GMT
comments inline.

> > 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
[quoted text clipped - 3 lines]
> 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
Tim Marshall - 28 Feb 2007 05:12 GMT
 > 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.

Signature

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

ApexData@gmail.com - 28 Feb 2007 19:22 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.