Forum Discussion
Chuckz1947
Dec 25, 2022Copper Contributor
VAL function in afterUpdate property of control
In a real estate properties DB I have a form with: 1. a ctrl, Tstnumb, for target street numbers. The underlying field is a text field 2. a ctrl for the value of ValTstnumb, which holds the value o...
Dec 27, 2022
Hi,
Have you tested if it is really a problem with Val() or rather with the reference to the control? What happens if you use:
Valtstnumb =TstNumb
and
Valtstnumb = Me!TstNumb.Value
and
Valtstnumb = Val(Me!TstNumb.Value)
?
Servus
Karl
****************
Access Bug Trackers
Access News
Access DevCon
Chuckz1947
Dec 28, 2022Copper Contributor
None of the above solve the issue.
Not sure if I mentioned this, but in a query I use similar code that does work. I use the query method when I import batches of data. The query is:
UPDATE Properties SET Properties.Valtstnumb = Val([tstnumb])
WHERE (((Properties.Valtstnumb)<1));
The above populates the field ValTstnumb in records where ValTstnumb is not populated.
Not sure if I mentioned this, but in a query I use similar code that does work. I use the query method when I import batches of data. The query is:
UPDATE Properties SET Properties.Valtstnumb = Val([tstnumb])
WHERE (((Properties.Valtstnumb)<1));
The above populates the field ValTstnumb in records where ValTstnumb is not populated.