A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Controlling data entry based on Option selected



 
 
Thread Tools Display Modes
  #11  
Old September 5th, 2006, 08:48 PM posted to microsoft.public.access.gettingstarted
iamrdbrown
external usenet poster
 
Posts: 30
Default Controlling data entry based on Option selected

Doug,
I tried this code and got the following error:

Run-time error '438
Object doesn't support this property or method

You guys are great to try to help me out like you are, I just wish I were
smart enough for the light-bulb to come on... Is there a easier way to get
these results other than programming? (I think I see a programming class in
the near future, otherwise)

"Douglas J. Steele" wrote:

If Forms!PPR_TrackingForm!CustomerNotified1 = 1 Then
Forms!PPR_TrackingForm!NotifiedDate1.Visible = True
Else
Forms!PPR_TrackingForm!NotifiedDate1.Visible = False
End If

or, shorter,

Forms!PPR_TrackingForm!NotifiedDate1.Visible = _
(Forms!PPR_TrackingForm!CustomerNotified1 = 1)



--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"iamrdbrown" wrote in message
...
Ah-ha... that was it. I was getting the option, not the form properties.
That answered that question. Now for the next one:

The form name is PPR_TrackingForm
The first option group is CustomerNotified1
The field I am trying to show/hide based on the option group is
DateNotifed1

When I put in the code:
If PPR_TrackingForm!CustomerNotified1 = 1 Then
PPR_TrackingForm!NotifiedDate1.Visible = True
'PPR_TrackingForm!NotifiedDate1.enabled=true
Else: PPR_TrackingForm!NotifiedDate1.Visible = False
'PPR_TrackingForm!NotificationDate1.enabled=false
End If

I get an error of "Run-time error 424, Object required". I don't do
programming (haven't since the class I took in college in 94) and I have
no
idea what this is trying to tell me. It gives me the option to debug &
the
debugger shows the first line high-lighted when I open it. I am sure this
is
something else I am doing (or not doing that I should), but I sure can't
figure it out... Any help would be greatly appreciated.

TIA,
Ruth

"John Vinson" wrote:

On Tue, 5 Sep 2006 08:21:21 -0700, iamrdbrown
wrote:

Larry,
I finally got a chance to try this logic & I am not finding the
OnCurrent
event field in the properties. I do see the OnChange event field, but
not
the OnCurrent. I know I am overlooking something - but I can't figure
that
one out...

Make sure you're looking at the Form's properties (not the properties
of some control or section on the form). One way to get to the form's
properties is to right mouseclick the little square box at the upper
left intersection of the rulers in design view, and select Properties.

John W. Vinson[MVP]




  #12  
Old September 5th, 2006, 09:01 PM posted to microsoft.public.access.gettingstarted
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Controlling data entry based on Option selected

Which line of code is it complaining about when you get the error?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"iamrdbrown" wrote in message
...
Doug,
I tried this code and got the following error:

Run-time error '438
Object doesn't support this property or method

You guys are great to try to help me out like you are, I just wish I were
smart enough for the light-bulb to come on... Is there a easier way to
get
these results other than programming? (I think I see a programming class
in
the near future, otherwise)

"Douglas J. Steele" wrote:

If Forms!PPR_TrackingForm!CustomerNotified1 = 1 Then
Forms!PPR_TrackingForm!NotifiedDate1.Visible = True
Else
Forms!PPR_TrackingForm!NotifiedDate1.Visible = False
End If

or, shorter,

Forms!PPR_TrackingForm!NotifiedDate1.Visible = _
(Forms!PPR_TrackingForm!CustomerNotified1 = 1)



--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"iamrdbrown" wrote in message
...
Ah-ha... that was it. I was getting the option, not the form
properties.
That answered that question. Now for the next one:

The form name is PPR_TrackingForm
The first option group is CustomerNotified1
The field I am trying to show/hide based on the option group is
DateNotifed1

When I put in the code:
If PPR_TrackingForm!CustomerNotified1 = 1 Then
PPR_TrackingForm!NotifiedDate1.Visible = True
'PPR_TrackingForm!NotifiedDate1.enabled=true
Else: PPR_TrackingForm!NotifiedDate1.Visible = False
'PPR_TrackingForm!NotificationDate1.enabled=false
End If

I get an error of "Run-time error 424, Object required". I don't do
programming (haven't since the class I took in college in 94) and I
have
no
idea what this is trying to tell me. It gives me the option to debug &
the
debugger shows the first line high-lighted when I open it. I am sure
this
is
something else I am doing (or not doing that I should), but I sure
can't
figure it out... Any help would be greatly appreciated.

TIA,
Ruth

"John Vinson" wrote:

On Tue, 5 Sep 2006 08:21:21 -0700, iamrdbrown
wrote:

Larry,
I finally got a chance to try this logic & I am not finding the
OnCurrent
event field in the properties. I do see the OnChange event field,
but
not
the OnCurrent. I know I am overlooking something - but I can't
figure
that
one out...

Make sure you're looking at the Form's properties (not the properties
of some control or section on the form). One way to get to the form's
properties is to right mouseclick the little square box at the upper
left intersection of the rulers in design view, and select Properties.

John W. Vinson[MVP]






  #13  
Old September 5th, 2006, 09:15 PM posted to microsoft.public.access.gettingstarted
iamrdbrown
external usenet poster
 
Posts: 30
Default Controlling data entry based on Option selected

It was on the 1st line.

"Douglas J. Steele" wrote:

Which line of code is it complaining about when you get the error?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"iamrdbrown" wrote in message
...
Doug,
I tried this code and got the following error:

Run-time error '438
Object doesn't support this property or method

You guys are great to try to help me out like you are, I just wish I were
smart enough for the light-bulb to come on... Is there a easier way to
get
these results other than programming? (I think I see a programming class
in
the near future, otherwise)

"Douglas J. Steele" wrote:

If Forms!PPR_TrackingForm!CustomerNotified1 = 1 Then
Forms!PPR_TrackingForm!NotifiedDate1.Visible = True
Else
Forms!PPR_TrackingForm!NotifiedDate1.Visible = False
End If

or, shorter,

Forms!PPR_TrackingForm!NotifiedDate1.Visible = _
(Forms!PPR_TrackingForm!CustomerNotified1 = 1)



--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"iamrdbrown" wrote in message
...
Ah-ha... that was it. I was getting the option, not the form
properties.
That answered that question. Now for the next one:

The form name is PPR_TrackingForm
The first option group is CustomerNotified1
The field I am trying to show/hide based on the option group is
DateNotifed1

When I put in the code:
If PPR_TrackingForm!CustomerNotified1 = 1 Then
PPR_TrackingForm!NotifiedDate1.Visible = True
'PPR_TrackingForm!NotifiedDate1.enabled=true
Else: PPR_TrackingForm!NotifiedDate1.Visible = False
'PPR_TrackingForm!NotificationDate1.enabled=false
End If

I get an error of "Run-time error 424, Object required". I don't do
programming (haven't since the class I took in college in 94) and I
have
no
idea what this is trying to tell me. It gives me the option to debug &
the
debugger shows the first line high-lighted when I open it. I am sure
this
is
something else I am doing (or not doing that I should), but I sure
can't
figure it out... Any help would be greatly appreciated.

TIA,
Ruth

"John Vinson" wrote:

On Tue, 5 Sep 2006 08:21:21 -0700, iamrdbrown
wrote:

Larry,
I finally got a chance to try this logic & I am not finding the
OnCurrent
event field in the properties. I do see the OnChange event field,
but
not
the OnCurrent. I know I am overlooking something - but I can't
figure
that
one out...

Make sure you're looking at the Form's properties (not the properties
of some control or section on the form). One way to get to the form's
properties is to right mouseclick the little square box at the upper
left intersection of the rulers in design view, and select Properties.

John W. Vinson[MVP]







  #14  
Old September 5th, 2006, 09:21 PM posted to microsoft.public.access.gettingstarted
Rick Brandt
external usenet poster
 
Posts: 4,354
Default Controlling data entry based on Option selected

iamrdbrown wrote:
It was on the 1st line.


Is NotifiedDate1 the name of the *field* or the name of the *control*?
Controls have a visible property. Fields do not.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


  #15  
Old September 5th, 2006, 09:30 PM posted to microsoft.public.access.gettingstarted
iamrdbrown
external usenet poster
 
Posts: 30
Default Controlling data entry based on Option selected

I have both the control and the field named the same: NotifiedDate1. This
was done in an effort to help me know which field goes with which control
when I started working on this issue.

"Rick Brandt" wrote:

iamrdbrown wrote:
It was on the 1st line.


Is NotifiedDate1 the name of the *field* or the name of the *control*?
Controls have a visible property. Fields do not.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com



  #16  
Old September 6th, 2006, 12:11 PM posted to microsoft.public.access.gettingstarted
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Controlling data entry based on Option selected

I always rename my controls by putting txt in front if it's a text box, cbo
if it's a combo box and so on. So field NotifiedDate1 would be displayed in
text box txtNotifiedDate1. Yes, it's a pain to have to type all those extra
characters, but I find it's worth it.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"iamrdbrown" wrote in message
...
I have both the control and the field named the same: NotifiedDate1. This
was done in an effort to help me know which field goes with which control
when I started working on this issue.

"Rick Brandt" wrote:

iamrdbrown wrote:
It was on the 1st line.


Is NotifiedDate1 the name of the *field* or the name of the *control*?
Controls have a visible property. Fields do not.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.