I have inputted the following code as an "After Event" sequence on a form which should cause a field entitled "PropertyID" to be filled with a string comprising of elements from 2 other user inputted fields.
It is not working however, displaying the following message:
"Run-time error '438'
Object doesn't support this property or method", with de-bugger focussing in on the line shown below with the arrow.
Code is:
Private Sub Postcode_AfterUpdate()
Dim adl1 As String
Dim pcode As String
Dim pid As String
pcode = Forms!Property!Postcode.Text
Forms!Property!AddressLine1.SetFocus
adl1 = Forms!Property!AddressLine1.Text
pid = UCase(Right(pcode, 3) & Left(adl1, 2))
If Len(pid) = 5 Then
Forms!Property!PropertyID.SetFocus <---
If Forms!Property!PropertyID = "" Then
Forms!Property!PropertyID = pid
End If
End If
Forms!Property!Picture.SetFocus
End Sub
Anyone got any suggestions??? I've tried allsorts...
It is not working however, displaying the following message:
"Run-time error '438'
Object doesn't support this property or method", with de-bugger focussing in on the line shown below with the arrow.
Code is:
Private Sub Postcode_AfterUpdate()
Dim adl1 As String
Dim pcode As String
Dim pid As String
pcode = Forms!Property!Postcode.Text
Forms!Property!AddressLine1.SetFocus
adl1 = Forms!Property!AddressLine1.Text
pid = UCase(Right(pcode, 3) & Left(adl1, 2))
If Len(pid) = 5 Then
Forms!Property!PropertyID.SetFocus <---
If Forms!Property!PropertyID = "" Then
Forms!Property!PropertyID = pid
End If
End If
Forms!Property!Picture.SetFocus
End Sub
Anyone got any suggestions??? I've tried allsorts...