Send value to function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,


Can someone demonstrate how to send a value from a sub procedure to a
function procedure if you have the following:


Private Function BDate_BeforeUpdate(bd As Integer)
Debug.Print bd
End Function


Private Sub AnyDate_AfterUpdate()
Dim ad As Integer
ad = BDate(Me.AnyDate.Value)
Me.Birthdates = Null
End Sub

I keep getting error messages when trying to run the above procedures.

-Sky
 
What is the error message that you get? and on which step?

Is BDate a control on your form?

The function name in your code is BDate_BeforeUpdate, but you're just using
BDate when you try to call the function.
 
Ken,

I was using the wrong approach to solve an issue. Turns out I didn't need to
use functions at all. I ended up using a Group control as suggested by John
Vinson MVP. I didn't explain things correctly to you, but I'm sure you would
have given me the same approach as John did.

Thanks though for replying to my question. I always appreciate your input
and willingness to help :-)

-Sky
 
Back
Top