473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Disable the Continuous Form or RecordSelector

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
5 3810
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: B | last post by:
I know there are several ways to speed up combo boxes and form loading. Most of the solutions leave rowsource of the combo box blank and set the rowsource to a saved query or an SQL with a where...
3
by: Richard Hollenbeck | last post by:
I have the following query in my form's code: Private Function Get_Data(fieldNum As Integer) Dim strSQL As String Dim db As DAO.Database Dim rs As DAO.Recordset strSQL = "SELECT & "", "" & ...
4
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. ...
2
by: Frank | last post by:
Hello, is there a way to remove the recordselector (the first column) in a datagrid? Using styles doesn't seem to help, VB adds this column. Thanks Frank
5
by: dzulai | last post by:
i have a continuous subform and its AllowAdditons and AllowEdits property are set to false. A command button("Add") in my main form sets both properties to True, enabling the New Record to appear. My...
2
by: Matuag | last post by:
Hi All, I want to create following command buttons on a Form which users can edit. Save ( Save Changes made) Cancel ( Undo data changes) Exit ( Close form) I am using Macros for each of...
2
by: Steve | last post by:
I have a continuous form showing Product Code and Product Name. Product Code is five digits and is sequential. I have a textbox in the form header. What is the code to scroll the continuous form so...
1
by: Billiska | last post by:
I can not find out how. I think it will be useful (and beautiful) if I can set the focus to a recordselector. For example, in the datasheet view, I can use this to select a row programatically. ...
8
by: Steffen Beck | last post by:
Hi NG I need some help with a problem on my forms. If I have 2 related tables, for instance companies and employees, and want to display all companies on a continuous form with their...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.