P
PowerPoint Jedi
hi,
Did a quick search and was unable to answer my question.
First off I am using Access 2003.
background.
I am making a from to enter testing status into a table. As it may take a
couple days to enter the data I wanted to use a Combo box with a Y/N
selection to determine if it is open or closed. When finished the user
should select yes and the this should trigger code to fill in the date closed
combo box with today's date
Here is what i currently have
Combo box #1
name - Closed
Combo box #2
name - closed date
Code for combo box #1 after update
Private Sub closed_AfterUpdate()
Forms![ERGR]![closed date] = Date
End Sub
This updates the closed date whether i select yes or no. so i tried this
Private Sub Closed_AfterUpdate()
If Forms![ERGR]![Closed] = yes Then Forms![ERGR]![closed date] = Date
Else: Forms![ERGR]![closed date] = Null
End If
End Sub
hoping it would use a null if not yes. When I run this i get the following
error
"compile error:
Else without if"
So could someone please tell me what I did wrong> I am new to this so be
gentle
Thanks in advance
Did a quick search and was unable to answer my question.
First off I am using Access 2003.
background.
I am making a from to enter testing status into a table. As it may take a
couple days to enter the data I wanted to use a Combo box with a Y/N
selection to determine if it is open or closed. When finished the user
should select yes and the this should trigger code to fill in the date closed
combo box with today's date
Here is what i currently have
Combo box #1
name - Closed
Combo box #2
name - closed date
Code for combo box #1 after update
Private Sub closed_AfterUpdate()
Forms![ERGR]![closed date] = Date
End Sub
This updates the closed date whether i select yes or no. so i tried this
Private Sub Closed_AfterUpdate()
If Forms![ERGR]![Closed] = yes Then Forms![ERGR]![closed date] = Date
Else: Forms![ERGR]![closed date] = Null
End If
End Sub
hoping it would use a null if not yes. When I run this i get the following
error
"compile error:
Else without if"
So could someone please tell me what I did wrong> I am new to this so be
gentle
Thanks in advance