Dec 25 2022 12:31 PM
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 of Tstnumb. The underlying field is a number field.
3. The objective is that when addresses, in particular the street numbers, are entered manually, the control Valtstnumb is populated.
4. The reason for having Valtstnumb is that sometimes an address number could be something like 21A or 135 - 137, and frequently Valtstnumb is used to drive the sort order in a query.
I believe that in the past the following has worked. It has been built into the form for decades but now produces a type mismatch error: Valtstnumb = Val([TstNumb])
I am using Access 365, and is subject to frequent Microsoft updates. I am wondering whether a recent update might be the issue.
Dec 26 2022 05:48 AM
Dec 26 2022 06:23 AM
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 08:41 AM - edited Dec 27 2022 08:42 AM
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
Dec 28 2022 08:52 AM
Dec 28 2022 08:21 PM