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...
Chuckz1947
Dec 26, 2022Copper Contributor
Thank you for your reply. Both the FE and BE are where they have always been. Th DB is entirely functional in all other respects. This is the error message, no matter what I enter as the street number, a number, a character or a combination:
- 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- Chuckz1947Dec 28, 2022Copper ContributorNone 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.