|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
VBA: Trying to use procedure parameter in expression, error within this message :)
hey folks!
thought i'd try and be clever and cut down on static code, lets get some of those dynamic juices flowing! right, well, what i would like to do is have a sub procedure that i can use to clear the values of a form object. ideally the name of the object should be sent to the procedure through a parameter (if possible) this is some code that i thought could work ![]() Code:
Public Sub DelFormObj(obj As String) Me.[obj].Value = Null End Sub the error i get is: Access can't find the field '|' referred to in your expression I'm new to VB/VBA so any help will be greatly appreciated! |
|
#2
|
|||
|
|||
|
answer found. (in this forum actually, aint search brilliant!)
turns out that if i want to use a variable in an expression i just have to use parenthesis instead. Me(variablename).Value instead of Me.[variablename].Value |
|
#3
|
|||
|
|||
|
trying to use procedure parameter
I'm having a similar problem and tried your solution but it doesn't work. Any other suggestions?
Thanks |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > VBA: Trying to use procedure parameter in expression, error within this message :) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|