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
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