Option group help?

W

Webb

This is probably a pretty simple question for you smart people. Not so for me.

I am working on a Contact database to track psychiatric appointmets. I am
just stumped with the VB coding stuff, and I hope that you can either point me to a tutorial or, if you would be so kind as to help me figure this out. I've looked everywhere on the net for a simple guide. I have learned some, but I think its over my head.

I have a subform which has the following fields

DOC#
Appointment Date
Appointment Time
RTC DUE(this is the due date)

I am trying to make each Option Group automatically calculate the RTC DUE date by selecting one of the following options. Select the 1 wk option..and it will calculate a date one week from whatever date is entered in the Appointment Date...and put the calculated date in the RTC DUE field. Same for 2 wks, 3 wks, 1 mo, 2 mos, 3 mos etc...

RTC DUE Option Labels are:
1 wk
2 wks
3 wks
1 mos
2 mos
3 mos

I used the Option Group Wizard, and entered the above labels
options and left the corresponding values as 1, 2, 3, 4, 5, 6.
The Wizard asks me if I want to store the value in a field, and I chose the RTC DUE field.
Now what do I do? If I right click on each of the option buttons and try to put in the DateAdd function where it shows the value: =DateAdd("w", 1,
[Appointment Date]), etc., but I found out that doesn't work. It puts 12/31/1899 in the RTC DUE field. I asked about this over in the access.forms group
but I guess I need someone to lead me by the hand through this.
So...I understand that I need to forget about each individual option button, and Right Click on the Option Group itself, go to Properties to the AfterUpdate section....and click on Code Builder. Ha...so this is where I need some guidance. Now what do I do? I don't know how to tell it what I want.


Any help is appreciated.

LaDonna
 
D

Duane Hookom

There is at least one reply in the MPA.forms where you asked the same exact
question.
Please create only a single thread for a single question.


--
Duane Hookom
MS Access MVP



This is probably a pretty simple question for you smart people. Not so for
me.

I am working on a Contact database to track psychiatric appointmets. I am
just stumped with the VB coding stuff, and I hope that you can either point
me to a tutorial or, if you would be so kind as to help me figure this out.
I've looked everywhere on the net for a simple guide. I have learned some,
but I think its over my head.

I have a subform which has the following fields

DOC#
Appointment Date
Appointment Time
RTC DUE(this is the due date)

I am trying to make each Option Group automatically calculate the RTC DUE
date by selecting one of the following options. Select the 1 wk option..and
it will calculate a date one week from whatever date is entered in the
Appointment Date...and put the calculated date in the RTC DUE field. Same
for 2 wks, 3 wks, 1 mo, 2 mos, 3 mos etc...

RTC DUE Option Labels are:
1 wk
2 wks
3 wks
1 mos
2 mos
3 mos

I used the Option Group Wizard, and entered the above labels
options and left the corresponding values as 1, 2, 3, 4, 5, 6.
The Wizard asks me if I want to store the value in a field, and I chose the
RTC DUE field.
Now what do I do? If I right click on each of the option buttons and try to
put in the DateAdd function where it shows the value: =DateAdd("w", 1,
[Appointment Date]), etc., but I found out that doesn't work. It puts
12/31/1899 in the RTC DUE field. I asked about this over in the
access.forms group
but I guess I need someone to lead me by the hand through this.
So...I understand that I need to forget about each individual option button,
and Right Click on the Option Group itself, go to Properties to the
AfterUpdate section....and click on Code Builder. Ha...so this is where I
need some guidance. Now what do I do? I don't know how to tell it what I
want.


Any help is appreciated.

LaDonna
 
W

Webb

Sorry. Didn't realize that you shouldn't ask the same question in different forums.
"Duane Hookom" <DuaneAtNoSpanHookomDotNet> wrote in message There is at least one reply in the MPA.forms where you asked the same exact
question.
Please create only a single thread for a single question.


--
Duane Hookom
MS Access MVP



This is probably a pretty simple question for you smart people. Not so for
me.

I am working on a Contact database to track psychiatric appointmets. I am
just stumped with the VB coding stuff, and I hope that you can either point
me to a tutorial or, if you would be so kind as to help me figure this out.
I've looked everywhere on the net for a simple guide. I have learned some,
but I think its over my head.

I have a subform which has the following fields

DOC#
Appointment Date
Appointment Time
RTC DUE(this is the due date)

I am trying to make each Option Group automatically calculate the RTC DUE
date by selecting one of the following options. Select the 1 wk option..and
it will calculate a date one week from whatever date is entered in the
Appointment Date...and put the calculated date in the RTC DUE field. Same
for 2 wks, 3 wks, 1 mo, 2 mos, 3 mos etc...

RTC DUE Option Labels are:
1 wk
2 wks
3 wks
1 mos
2 mos
3 mos

I used the Option Group Wizard, and entered the above labels
options and left the corresponding values as 1, 2, 3, 4, 5, 6.
The Wizard asks me if I want to store the value in a field, and I chose the
RTC DUE field.
Now what do I do? If I right click on each of the option buttons and try to
put in the DateAdd function where it shows the value: =DateAdd("w", 1,
[Appointment Date]), etc., but I found out that doesn't work. It puts
12/31/1899 in the RTC DUE field. I asked about this over in the
access.forms group
but I guess I need someone to lead me by the hand through this.
So...I understand that I need to forget about each individual option button,
and Right Click on the Option Group itself, go to Properties to the
AfterUpdate section....and click on Code Builder. Ha...so this is where I
need some guidance. Now what do I do? I don't know how to tell it what I
want.


Any help is appreciated.

LaDonna
 
R

Rick Brandt

Webb said:
Sorry. Didn't realize that you shouldn't ask the same question in different
forums.

Within reason, that is perfectly okay, but you should crosspost to the groups
with a single submission instead of multi-posting separate submissions.

You also should not post in HTML format either unless the group is designated as
a binary group.
 

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