Cont. Forms/Individual Record/working with properties

  • Thread starter David Mulholland
  • Start date
D

David Mulholland

Hi all,

I'm working on a continuous form. Each record has 5 locked fields (for view
only) and 2 drop-downs ([Avail_Status] and [Reason_Not_Avail]). For an
individual record, I need the [Reason_Not_Avail] field to be locked if the
user selects 'Available' from the [Avail_Status] drop-down. They are both
bound fields.

I've tried using the [Avail_Status] AfterUpdate event but that locks all the
[Reason_Not_Avail] fields in all the records on the form. I've tried using
the OnCurrent event, but the code is being ignored.

Any suggestions?
 
A

Albert D. Kallal

David Mulholland said:
Hi all,

I'm working on a continuous form. Each record has 5 locked fields (for
view
only) and 2 drop-downs ([Avail_Status] and [Reason_Not_Avail]). For an
individual record, I need the [Reason_Not_Avail] field to be locked if the
user selects 'Available' from the [Avail_Status] drop-down. They are both
bound fields.

I've tried using the [Avail_Status] AfterUpdate event but that locks all
the
[Reason_Not_Avail] fields in all the records on the form. I've tried using
the OnCurrent event, but the code is being ignored.

Any suggestions?

I certainly have a lot of continues forms where I set the controls 'enabled'
property on/off. While this actually makes all instances of the control go
disabled, I actually find this works quite well. I mean, when you move
to the next row, those columns that you enable, or disable can then
be set. So, you could set the controls visible property as you move
the cursor up/down through the

In fact, I actually PREFER the above behavior, as then during
data entry it is VERY easy to see that the column in question
is enabled.

In place of a VERY HARD TO READ checkerboard pattern of enabled, and
disabled boxes, , you get a very nice enable/display view as I move the
cursor
up /down.

I have uploaded a gif animation of me navigating in a form, both of the two
screen shots will give you an idea of how this looks.

http://www.members.shaw.ca/AlbertKallal/HideColumn/index.htm
 
D

David Mulholland

That's probably what I'll be going with. After playing with it some more, I
tried setting the [Reason_Not_Avail] locked property using the control's
OnEnter event rather than the previous control's afterupdate. It does just as
your example shows (locks all the fields), but works more seemlessly when
selecting other records. If the fields meets the lock requirement, I have the
focus moved back to the previous control.

All in all, it does what I need. I was just looking for something a little
more 'expected' (from the end-user's point of view) since it just might freak
some of them with all their fields locking/dimming or unlocking/undimming.

Thanks for the reponse and the example help. :)

Albert D. Kallal said:
David Mulholland said:
Hi all,

I'm working on a continuous form. Each record has 5 locked fields (for
view
only) and 2 drop-downs ([Avail_Status] and [Reason_Not_Avail]). For an
individual record, I need the [Reason_Not_Avail] field to be locked if the
user selects 'Available' from the [Avail_Status] drop-down. They are both
bound fields.

I've tried using the [Avail_Status] AfterUpdate event but that locks all
the
[Reason_Not_Avail] fields in all the records on the form. I've tried using
the OnCurrent event, but the code is being ignored.

Any suggestions?

I certainly have a lot of continues forms where I set the controls 'enabled'
property on/off. While this actually makes all instances of the control go
disabled, I actually find this works quite well. I mean, when you move
to the next row, those columns that you enable, or disable can then
be set. So, you could set the controls visible property as you move
the cursor up/down through the

In fact, I actually PREFER the above behavior, as then during
data entry it is VERY easy to see that the column in question
is enabled.

In place of a VERY HARD TO READ checkerboard pattern of enabled, and
disabled boxes, , you get a very nice enable/display view as I move the
cursor
up /down.

I have uploaded a gif animation of me navigating in a form, both of the two
screen shots will give you an idea of how this looks.

http://www.members.shaw.ca/AlbertKallal/HideColumn/index.htm


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.members.shaw.ca/AlbertKallal
 
J

John W. Vinson

Hi all,

I'm working on a continuous form. Each record has 5 locked fields (for view
only) and 2 drop-downs ([Avail_Status] and [Reason_Not_Avail]). For an
individual record, I need the [Reason_Not_Avail] field to be locked if the
user selects 'Available' from the [Avail_Status] drop-down. They are both
bound fields.

I've tried using the [Avail_Status] AfterUpdate event but that locks all the
[Reason_Not_Avail] fields in all the records on the form. I've tried using
the OnCurrent event, but the code is being ignored.

Any suggestions?

You can use Format... Conditional Formatting on the form design menu to enable
or disable the combo box - but not (AFIAK) lock or unlock it. The only
difference in this case is that it'll be greyed out if it's disabled.
 
P

Paul Shapiro

You could set the enabled property in OnCurrent, so the user will
immediately see they can't edit that field rather than being bounced out
when they try to enter it. You'd have to re-evaluate the condition in the
AfterUpdate event of any other control whose value would affect the
decision.

David Mulholland said:
That's probably what I'll be going with. After playing with it some more,
I
tried setting the [Reason_Not_Avail] locked property using the control's
OnEnter event rather than the previous control's afterupdate. It does just
as
your example shows (locks all the fields), but works more seemlessly when
selecting other records. If the fields meets the lock requirement, I have
the
focus moved back to the previous control.

All in all, it does what I need. I was just looking for something a little
more 'expected' (from the end-user's point of view) since it just might
freak
some of them with all their fields locking/dimming or unlocking/undimming.

Thanks for the reponse and the example help. :)

Albert D. Kallal said:
David Mulholland said:
Hi all,

I'm working on a continuous form. Each record has 5 locked fields (for
view
only) and 2 drop-downs ([Avail_Status] and [Reason_Not_Avail]). For an
individual record, I need the [Reason_Not_Avail] field to be locked if
the
user selects 'Available' from the [Avail_Status] drop-down. They are
both
bound fields.

I've tried using the [Avail_Status] AfterUpdate event but that locks
all
the
[Reason_Not_Avail] fields in all the records on the form. I've tried
using
the OnCurrent event, but the code is being ignored.

Any suggestions?

I certainly have a lot of continues forms where I set the controls
'enabled'
property on/off. While this actually makes all instances of the control
go
disabled, I actually find this works quite well. I mean, when you move
to the next row, those columns that you enable, or disable can then
be set. So, you could set the controls visible property as you move
the cursor up/down through the

In fact, I actually PREFER the above behavior, as then during
data entry it is VERY easy to see that the column in question
is enabled.

In place of a VERY HARD TO READ checkerboard pattern of enabled, and
disabled boxes, , you get a very nice enable/display view as I move the
cursor
up /down.

I have uploaded a gif animation of me navigating in a form, both of the
two
screen shots will give you an idea of how this looks.

http://www.members.shaw.ca/AlbertKallal/HideColumn/index.htm


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.members.shaw.ca/AlbertKallal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top