WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Editable field only based on another field

 
Goto page 1, 2
   Home -> Office other -> Table Design RSS
Next:  Splitting database and refresh table links.  
Author Message
julostarr

External


Since: Feb 01, 2008
Posts: 31



(Msg. 1) Posted: Thu Sep 25, 2008 7:12 am
Post subject: Editable field only based on another field
Archived from groups: microsoft>public>access>tablesdbdesign (more info?)

Is there a way to make one field only editable based on the answer (like a
Yes/No checkbox) or entry of another field?

For example if you have a Yes/No checkbox and you check No then that makes
another field unavailable to edit, but if you check Yes then that field is
open to edit or instead of a Yes/No it is another data type and you are
required to enter something in order for another field to become editable.
--
julostarr
Back to top
Login to vote
Jeff Boyce

External


Since: Nov 04, 2004
Posts: 3939



(Msg. 2) Posted: Thu Sep 25, 2008 1:54 pm
Post subject: Re: Editable field only based on another field [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You could add something like the following to the AfterUpdate event of your
Yes/No checkbox control:

Me!YourOtherField.Enabled = Me!YourCheckbox


Regards

Jeff Boyce
Microsoft Office/Access MVP

"julostarr" <julostarr RemoveThis @discussions.microsoft.com> wrote in message
news:CB76466B-13CA-4381-9809-F6184D1E353D@microsoft.com...
> Is there a way to make one field only editable based on the answer (like a
> Yes/No checkbox) or entry of another field?
>
> For example if you have a Yes/No checkbox and you check No then that makes
> another field unavailable to edit, but if you check Yes then that field is
> open to edit or instead of a Yes/No it is another data type and you are
> required to enter something in order for another field to become editable.
> --
> julostarr
Back to top
Login to vote
julostarr

External


Since: Feb 01, 2008
Posts: 31



(Msg. 3) Posted: Thu Sep 25, 2008 2:44 pm
Post subject: Re: Editable field only based on another field [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Do I use this in the table, a form or query?
--
julostarr


"Jeff Boyce" wrote:

> You could add something like the following to the AfterUpdate event of your
> Yes/No checkbox control:
>
> Me!YourOtherField.Enabled = Me!YourCheckbox
>
>
> Regards
>
> Jeff Boyce
> Microsoft Office/Access MVP
>
> "julostarr" <julostarr.DeleteThis@discussions.microsoft.com> wrote in message
> news:CB76466B-13CA-4381-9809-F6184D1E353D@microsoft.com...
> > Is there a way to make one field only editable based on the answer (like a
> > Yes/No checkbox) or entry of another field?
> >
> > For example if you have a Yes/No checkbox and you check No then that makes
> > another field unavailable to edit, but if you check Yes then that field is
> > open to edit or instead of a Yes/No it is another data type and you are
> > required to enter something in order for another field to become editable.
> > --
> > julostarr
>
>
>
Back to top
Login to vote
Jeff Boyce

External


Since: Nov 04, 2004
Posts: 3939



(Msg. 4) Posted: Thu Sep 25, 2008 4:39 pm
Post subject: Re: Editable field only based on another field [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Access is not a "spreadsheet on steroids". You would not add this to a
table, which has no events, but to a form, which does.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"julostarr" <julostarr RemoveThis @discussions.microsoft.com> wrote in message
news:6ADF68E9-B73C-4A39-B827-24C5833DD1C6@microsoft.com...
> Do I use this in the table, a form or query?
> --
> julostarr
>
>
> "Jeff Boyce" wrote:
>
>> You could add something like the following to the AfterUpdate event of
>> your
>> Yes/No checkbox control:
>>
>> Me!YourOtherField.Enabled = Me!YourCheckbox
>>
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Office/Access MVP
>>
>> "julostarr" <julostarr RemoveThis @discussions.microsoft.com> wrote in message
>> news:CB76466B-13CA-4381-9809-F6184D1E353D@microsoft.com...
>> > Is there a way to make one field only editable based on the answer
>> > (like a
>> > Yes/No checkbox) or entry of another field?
>> >
>> > For example if you have a Yes/No checkbox and you check No then that
>> > makes
>> > another field unavailable to edit, but if you check Yes then that field
>> > is
>> > open to edit or instead of a Yes/No it is another data type and you are
>> > required to enter something in order for another field to become
>> > editable.
>> > --
>> > julostarr
>>
>>
>>
Back to top
Login to vote
julostarr

External


Since: Feb 01, 2008
Posts: 31



(Msg. 5) Posted: Fri Sep 26, 2008 8:00 am
Post subject: Re: Editable field only based on another field [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Well I figured that, but I'm just making sure that there wasn't some way that
I didn't know about. I already tried to put this in a form in the
AfterUpdate in my checkbox control properties. After returning to datasheet
view if I click the checkbox (on or off) I get the following message box:

"The expression After Update you entered as the event property setting
produced the following error: The object doesn't contain the Automation
object 'Benefits.'.

"*The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure].
*There may have been an error evaluating the function, event, or macro."

This is what I put in the After Update field according to your suggestion,
but I used the expression builder in my check box properties window to help
build it:

=Benefits![401(k)%].Enabled=Benefits![401(k)Participant]

Is there something I entered wrong? This also didn't stop the other field
from being editable regardless if the check box was checked or not.
--
julostarr


"Jeff Boyce" wrote:

> Access is not a "spreadsheet on steroids". You would not add this to a
> table, which has no events, but to a form, which does.
>
> Regards
>
> Jeff Boyce
> Microsoft Office/Access MVP
>
> "julostarr" <julostarr.DeleteThis@discussions.microsoft.com> wrote in message
> news:6ADF68E9-B73C-4A39-B827-24C5833DD1C6@microsoft.com...
> > Do I use this in the table, a form or query?
> > --
> > julostarr
> >
> >
> > "Jeff Boyce" wrote:
> >
> >> You could add something like the following to the AfterUpdate event of
> >> your
> >> Yes/No checkbox control:
> >>
> >> Me!YourOtherField.Enabled = Me!YourCheckbox
> >>
> >>
> >> Regards
> >>
> >> Jeff Boyce
> >> Microsoft Office/Access MVP
> >>
> >> "julostarr" <julostarr.DeleteThis@discussions.microsoft.com> wrote in message
> >> news:CB76466B-13CA-4381-9809-F6184D1E353D@microsoft.com...
> >> > Is there a way to make one field only editable based on the answer
> >> > (like a
> >> > Yes/No checkbox) or entry of another field?
> >> >
> >> > For example if you have a Yes/No checkbox and you check No then that
> >> > makes
> >> > another field unavailable to edit, but if you check Yes then that field
> >> > is
> >> > open to edit or instead of a Yes/No it is another data type and you are
> >> > required to enter something in order for another field to become
> >> > editable.
> >> > --
> >> > julostarr
> >>
> >>
> >>
>
>
>
Back to top
Login to vote
Jeff Boyce

External


Since: Nov 04, 2004
Posts: 3939



(Msg. 6) Posted: Fri Sep 26, 2008 8:29 am
Post subject: Re: Editable field only based on another field [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The error message suggests that Access doesn't have an "automation object"
named "Benefits" ... and I'm pretty sure it doesn't!

Are you trying to refer to a value on a form? If so, check the proper
syntax via Access HELP on 'expressions'. I believe it's something like:

Forms!YourFormName!YourControlName

Regards

Jeff Boyce
Microsoft Office/Access MVP


"julostarr" <julostarr.DeleteThis@discussions.microsoft.com> wrote in message
news:91493B90-7CD9-418E-8C68-075FAE662775@microsoft.com...
> Well I figured that, but I'm just making sure that there wasn't some way
> that
> I didn't know about. I already tried to put this in a form in the
> AfterUpdate in my checkbox control properties. After returning to
> datasheet
> view if I click the checkbox (on or off) I get the following message box:
>
> "The expression After Update you entered as the event property setting
> produced the following error: The object doesn't contain the Automation
> object 'Benefits.'.
>
> "*The expression may not result in the name of a macro, the name of a
> user-defined function, or [Event Procedure].
> *There may have been an error evaluating the function, event, or macro."
>
> This is what I put in the After Update field according to your suggestion,
> but I used the expression builder in my check box properties window to
> help
> build it:
>
> =Benefits![401(k)%].Enabled=Benefits![401(k)Participant]
>
> Is there something I entered wrong? This also didn't stop the other field
> from being editable regardless if the check box was checked or not.
> --
> julostarr
>
>
> "Jeff Boyce" wrote:
>
>> Access is not a "spreadsheet on steroids". You would not add this to a
>> table, which has no events, but to a form, which does.
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Office/Access MVP
>>
>> "julostarr" <julostarr.DeleteThis@discussions.microsoft.com> wrote in message
>> news:6ADF68E9-B73C-4A39-B827-24C5833DD1C6@microsoft.com...
>> > Do I use this in the table, a form or query?
>> > --
>> > julostarr
>> >
>> >
>> > "Jeff Boyce" wrote:
>> >
>> >> You could add something like the following to the AfterUpdate event of
>> >> your
>> >> Yes/No checkbox control:
>> >>
>> >> Me!YourOtherField.Enabled = Me!YourCheckbox
>> >>
>> >>
>> >> Regards
>> >>
>> >> Jeff Boyce
>> >> Microsoft Office/Access MVP
>> >>
>> >> "julostarr" <julostarr.DeleteThis@discussions.microsoft.com> wrote in message
>> >> news:CB76466B-13CA-4381-9809-F6184D1E353D@microsoft.com...
>> >> > Is there a way to make one field only editable based on the answer
>> >> > (like a
>> >> > Yes/No checkbox) or entry of another field?
>> >> >
>> >> > For example if you have a Yes/No checkbox and you check No then that
>> >> > makes
>> >> > another field unavailable to edit, but if you check Yes then that
>> >> > field
>> >> > is
>> >> > open to edit or instead of a Yes/No it is another data type and you
>> >> > are
>> >> > required to enter something in order for another field to become
>> >> > editable.
>> >> > --
>> >> > julostarr
>> >>
>> >>
>> >>
>>
>>
>>
Back to top
Login to vote
julostarr

External


Since: Feb 01, 2008
Posts: 31



(Msg. 7) Posted: Fri Sep 26, 2008 9:34 am
Post subject: Re: Editable field only based on another field [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I was thinking maybe their might be a conditional expression or IFF function
I could write that would tell my form if mycheckbox was checked yes then
allow editing on another field and if it is checked no then not to allow
editing. I am not sure where to put that or exactly what content to put in
it to construct that expression.
--
julostarr


"Jeff Boyce" wrote:

> The error message suggests that Access doesn't have an "automation object"
> named "Benefits" ... and I'm pretty sure it doesn't!
>
> Are you trying to refer to a value on a form? If so, check the proper
> syntax via Access HELP on 'expressions'. I believe it's something like:
>
> Forms!YourFormName!YourControlName
>
> Regards
>
> Jeff Boyce
> Microsoft Office/Access MVP
>
>
> "julostarr" <julostarr RemoveThis @discussions.microsoft.com> wrote in message
> news:91493B90-7CD9-418E-8C68-075FAE662775@microsoft.com...
> > Well I figured that, but I'm just making sure that there wasn't some way
> > that
> > I didn't know about. I already tried to put this in a form in the
> > AfterUpdate in my checkbox control properties. After returning to
> > datasheet
> > view if I click the checkbox (on or off) I get the following message box:
> >
> > "The expression After Update you entered as the event property setting
> > produced the following error: The object doesn't contain the Automation
> > object 'Benefits.'.
> >
> > "*The expression may not result in the name of a macro, the name of a
> > user-defined function, or [Event Procedure].
> > *There may have been an error evaluating the function, event, or macro."
> >
> > This is what I put in the After Update field according to your suggestion,
> > but I used the expression builder in my check box properties window to
> > help
> > build it:
> >
> > =Benefits![401(k)%].Enabled=Benefits![401(k)Participant]
> >
> > Is there something I entered wrong? This also didn't stop the other field
> > from being editable regardless if the check box was checked or not.
> > --
> > julostarr
> >
> >
> > "Jeff Boyce" wrote:
> >
> >> Access is not a "spreadsheet on steroids". You would not add this to a
> >> table, which has no events, but to a form, which does.
> >>
> >> Regards
> >>
> >> Jeff Boyce
> >> Microsoft Office/Access MVP
> >>
> >> "julostarr" <julostarr RemoveThis @discussions.microsoft.com> wrote in message
> >> news:6ADF68E9-B73C-4A39-B827-24C5833DD1C6@microsoft.com...
> >> > Do I use this in the table, a form or query?
> >> > --
> >> > julostarr
> >> >
> >> >
> >> > "Jeff Boyce" wrote:
> >> >
> >> >> You could add something like the following to the AfterUpdate event of
> >> >> your
> >> >> Yes/No checkbox control:
> >> >>
> >> >> Me!YourOtherField.Enabled = Me!YourCheckbox
> >> >>
> >> >>
> >> >> Regards
> >> >>
> >> >> Jeff Boyce
> >> >> Microsoft Office/Access MVP
> >> >>
> >> >> "julostarr" <julostarr RemoveThis @discussions.microsoft.com> wrote in message
> >> >> news:CB76466B-13CA-4381-9809-F6184D1E353D@microsoft.com...
> >> >> > Is there a way to make one field only editable based on the answer
> >> >> > (like a
> >> >> > Yes/No checkbox) or entry of another field?
> >> >> >
> >> >> > For example if you have a Yes/No checkbox and you check No then that
> >> >> > makes
> >> >> > another field unavailable to edit, but if you check Yes then that
> >> >> > field
> >> >> > is
> >> >> > open to edit or instead of a Yes/No it is another data type and you
> >> >> > are
> >> >> > required to enter something in order for another field to become
> >> >> > editable.
> >> >> > --
> >> >> > julostarr
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
Back to top
Login to vote
julostarr

External


Since: Feb 01, 2008
Posts: 31



(Msg. 8) Posted: Fri Sep 26, 2008 10:47 am
Post subject: Re: Editable field only based on another field [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Is there a way to build an IIF function that would essentially say for
example that "If [401(k)Participant] = Yes then make this make this
[401(k)Percent] editable else make it uneditable' and add it to the After
Update in the control properties box?
--
julostarr


"Jeff Boyce" wrote:

> The error message suggests that Access doesn't have an "automation object"
> named "Benefits" ... and I'm pretty sure it doesn't!
>
> Are you trying to refer to a value on a form? If so, check the proper
> syntax via Access HELP on 'expressions'. I believe it's something like:
>
> Forms!YourFormName!YourControlName
>
> Regards
>
> Jeff Boyce
> Microsoft Office/Access MVP
>
>
> "julostarr" <julostarr.TakeThisOut@discussions.microsoft.com> wrote in message
> news:91493B90-7CD9-418E-8C68-075FAE662775@microsoft.com...
> > Well I figured that, but I'm just making sure that there wasn't some way
> > that
> > I didn't know about. I already tried to put this in a form in the
> > AfterUpdate in my checkbox control properties. After returning to
> > datasheet
> > view if I click the checkbox (on or off) I get the following message box:
> >
> > "The expression After Update you entered as the event property setting
> > produced the following error: The object doesn't contain the Automation
> > object 'Benefits.'.
> >
> > "*The expression may not result in the name of a macro, the name of a
> > user-defined function, or [Event Procedure].
> > *There may have been an error evaluating the function, event, or macro."
> >
> > This is what I put in the After Update field according to your suggestion,
> > but I used the expression builder in my check box properties window to
> > help
> > build it:
> >
> > =Benefits![401(k)%].Enabled=Benefits![401(k)Participant]
> >
> > Is there something I entered wrong? This also didn't stop the other field
> > from being editable regardless if the check box was checked or not.
> > --
> > julostarr
> >
> >
> > "Jeff Boyce" wrote:
> >
> >> Access is not a "spreadsheet on steroids". You would not add this to a
> >> table, which has no events, but to a form, which does.
> >>
> >> Regards
> >>
> >> Jeff Boyce
> >> Microsoft Office/Access MVP
> >>
> >> "julostarr" <julostarr.TakeThisOut@discussions.microsoft.com> wrote in message
> >> news:6ADF68E9-B73C-4A39-B827-24C5833DD1C6@microsoft.com...
> >> > Do I use this in the table, a form or query?
> >> > --
> >> > julostarr
> >> >
> >> >
> >> > "Jeff Boyce" wrote:
> >> >
> >> >> You could add something like the following to the AfterUpdate event of
> >> >> your
> >> >> Yes/No checkbox control:
> >> >>
> >> >> Me!YourOtherField.Enabled = Me!YourCheckbox
> >> >>
> >> >>
> >> >> Regards
> >> >>
> >> >> Jeff Boyce
> >> >> Microsoft Office/Access MVP
> >> >>
> >> >> "julostarr" <julostarr.TakeThisOut@discussions.microsoft.com> wrote in message
> >> >> news:CB76466B-13CA-4381-9809-F6184D1E353D@microsoft.com...
> >> >> > Is there a way to make one field only editable based on the answer
> >> >> > (like a
> >> >> > Yes/No checkbox) or entry of another field?
> >> >> >
> >> >> > For example if you have a Yes/No checkbox and you check No then that
> >> >> > makes
> >> >> > another field unavailable to edit, but if you check Yes then that
> >> >> > field
> >> >> > is
> >> >> > open to edit or instead of a Yes/No it is another data type and you
> >> >> > are
> >> >> > required to enter something in order for another field to become
> >> >> > editable.
> >> >> > --
> >> >> > julostarr
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> Table Design All times are: Eastern Time (US & Canada) (change)
Goto page 1, 2
Page 1 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET