From: Curtis on
I am using the below coding, debug says there are no problems, but the Else
statement DoCmd will not run. Can anyone tell me what is wrong here?

Function Another_Record()

MSGBOX "Do you wish to do another LRU update?", vbYesNo, "LRU UPDATE"
If vbYes Then
DoCmd.GoToControl "Serial Number"
Else
DoCmd.Close acForm, "EDIT CDS LRU ASSET"
End If
End Function
From: RonaldoOneNil on
This has been answered already about 5 posts below this.

"Curtis" wrote:

> I am using the below coding, debug says there are no problems, but the Else
> statement DoCmd will not run. Can anyone tell me what is wrong here?
>
> Function Another_Record()
>
> MSGBOX "Do you wish to do another LRU update?", vbYesNo, "LRU UPDATE"
> If vbYes Then
> DoCmd.GoToControl "Serial Number"
> Else
> DoCmd.Close acForm, "EDIT CDS LRU ASSET"
> End If
> End Function
From: Marshall Barton on
Curtis wrote:

>I am using the below coding, debug says there are no problems, but the Else
>statement DoCmd will not run. Can anyone tell me what is wrong here?
>
>Function Another_Record()
>
> MSGBOX "Do you wish to do another LRU update?", vbYesNo, "LRU UPDATE"
> If vbYes Then
> DoCmd.GoToControl "Serial Number"
> Else
> DoCmd.Close acForm, "EDIT CDS LRU ASSET"
> End If
>End Function


Didn't I see this question asked and answered yesterday?

Function Another_Record()

If vbYes = MSGBOX("Do y . . .) Then
DoCmd.GoToControl "Serial Number"
Else
DoCmd.Close acForm, "EDIT CDS LRU ASSET"
End If
End Function

--
Marsh
MVP [MS Access]
 | 
Pages: 1
Prev: CDO message
Next: Error 94 Invalid use of Null