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

execute a line

P: 6
Hi! Does anyone how to make Access execute a line, something like this:
"me." & me.activecontrol.name & ".value = " date()

so, does anyone understand what i want and does anyone know how i can do it?

thanx for the help
Dec 12 '06 #1
Share this Question
Share on Google+
5 Replies


P: 6
"me." & me.activecontrol.name & ".value = " date()
that line should lokk more like
"me." & me.activecontrol.name & ".value = " & date()

however i still don't know how to make it work.
Dec 12 '06 #2

NeoPa
Expert Mod 15k+
P: 31,271
Try :
Expand|Select|Wrap|Line Numbers
  1. Me.ActiveControl = Date()
:)
Dec 12 '06 #3

P: 6
Tanx for the reply, but i don't need this to happen for the active control. Any other ideas?
I want to have a variable for example MyVariable = "Me.Text15"
I want to able to do sth like
MyVariable & ".Value=" & some value here
Now i want to execute this and i have no idea how.
text15 is not the active control.

Is it more clear now what i want to do? Can it be done in Access? I used sth like that in FoxPro some time ago, but i have forgotten exactly how it was done. And I never discovered how to do it in Access.

Thank you all for the help.
Dec 14 '06 #4

P: 6
I guess in my first post the example i have given was not right. I don't need the active control but any control I have chosen in VBA above. I'm sorry I don't explain right what I need to do, I hope now I'm more clear about my problem.
Dec 14 '06 #5

100+
P: 143
More information on exactly what you are trying to do might help. Incidentally,MyVariable = Me.TextBox will put what's in the textbox into MyVariable. No Quotation marks needed.
Dec 14 '06 #6

Post your reply

Sign in to post your reply or Sign up for a free account.