By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,497 Members | 2,113 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,497 IT Pros & Developers. It's quick & easy.

How do I pass a field name to a function?

P: n/a
zpq
tia

stan
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
rkc
As an arguement to the function.
Nov 12 '05 #2

P: n/a
zp*@comcast.net wrote:
tia

stan


Sub DisplayResults
Dim x As Integer
Dim y as Integer

x = 1
y = 2

msgbox "The total is " & SumIt(x,y)
endsub
Function SumIt(Value1 as integer, Value2 as integer) As Integer
SumIt =Value1 + Value2
End Function
Nov 12 '05 #3

P: n/a
rkc

"Salad" <hi**********@ranch.com> wrote in message
news:3F***************@ranch.com...
zp*@comcast.net wrote: Function SumIt(Value1 as integer, Value2 as integer) As Integer
SumIt =Value1 + Value2
End Function

Function Palatable (dt As Access.TextBox) as Boolean
If dt.Value <> "Ranch" then Palatable = TRUE
End Function
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.