A
António Castro Caldas
Hi All,
I've been trying to get a simple code to run but it hasn't been easy...
I'm designing a Form in Access 2003 and where a givemn event takes place I
call up a Function. Basically, the Function holds 2 arguments. One of them
is the name of the field in the form to change, the other one is the value.
Here's the function:
Function LastUpdate(nField, TempVar)
Dim strCtl As String
strCtl = "Forms![Pipeline]![" & nField & "]=" & TempVar
Eval (strCtl)
Me.[ProjectCode].SetFocus
End Function
Here's how I call it:
Call LastUpdate("GoGet", iGoget)
In the end, the [GoGet] field doesn't store the value that I pass through
the TempVar variable.
In Debug Mode, I can see that the strCtl is ok but somehow the EVAL function
isn't producing the effect that I want.
Anyone?
Thanks
Antonio
I've been trying to get a simple code to run but it hasn't been easy...
I'm designing a Form in Access 2003 and where a givemn event takes place I
call up a Function. Basically, the Function holds 2 arguments. One of them
is the name of the field in the form to change, the other one is the value.
Here's the function:
Function LastUpdate(nField, TempVar)
Dim strCtl As String
strCtl = "Forms![Pipeline]![" & nField & "]=" & TempVar
Eval (strCtl)
Me.[ProjectCode].SetFocus
End Function
Here's how I call it:
Call LastUpdate("GoGet", iGoget)
In the end, the [GoGet] field doesn't store the value that I pass through
the TempVar variable.
In Debug Mode, I can see that the strCtl is ok but somehow the EVAL function
isn't producing the effect that I want.
Anyone?
Thanks
Antonio