Connecting Tech Pros Worldwide Help | Site Map

trying to pass a field name as a string to a function

sparks
Guest
 
Posts: n/a
#1: Nov 13 '05
I have to pass a text field me.text8.value to a function
this contains a filename to link some tables.
such as database.mdb
have from 1 to 4 fields with names so I was trying to do this

For i = 1 To clickcounter
importfile = "Text" & 8 + i & ".Value"

function (importfile)


but the inportfile string contains text8.value
not what is in the text box text8
is this what is called a string to literal conversion or ???

not sure how to get this to work

any help would be greatly appreciated

jerry

sparks
Guest
 
Posts: n/a
#2: Nov 13 '05

re: trying to pass a field name as a string to a function


nevermind I figured it out..

jerry


On Mon, 23 Aug 2004 15:03:42 GMT, sparks <sparks@here.com> wrote:
[color=blue]
>I have to pass a text field me.text8.value to a function
>this contains a filename to link some tables.
>such as database.mdb
>have from 1 to 4 fields with names so I was trying to do this
>
>For i = 1 To clickcounter
>importfile = "Text" & 8 + i & ".Value"
>
>function (importfile)
>
>
>but the inportfile string contains text8.value
>not what is in the text box text8
>is this what is called a string to literal conversion or ???
>
>not sure how to get this to work
>
>any help would be greatly appreciated
>
>jerry[/color]

rkc
Guest
 
Posts: n/a
#3: Nov 13 '05

re: trying to pass a field name as a string to a function



"sparks" <sparks@here.com> wrote in message
news:3i1ki01t9mrtlhtbhrar9nf0ddpnkq6oj4@4ax.com...[color=blue]
> I have to pass a text field me.text8.value to a function
> this contains a filename to link some tables.
> such as database.mdb
> have from 1 to 4 fields with names so I was trying to do this
>
> For i = 1 To clickcounter
> importfile = "Text" & 8 + i & ".Value"[/color]

Me("Text" & 8 + i).Value



Closed Thread