A
acs68
Hi there,
I have some code that I want to switch the ControlSouce property based on
what the user selects.
If btnOwners.Caption = "Show Current Owner" Then
btnOwners.Caption = "Show Owner When Created"
Me!txtPropOwner.ControlSource = "DLookup("[PARCELADDR1]",
"tblPCSProperties", "[LotPlan] = " & "'" & [Forms]![frmRequests]!txtLotPlan
& "'")"
Else
btnOwners.Caption = "Show Current Owner"
Me!txtPropOwner.ControlSource = "ReqOWNER"
End If
The dlookup part doesn't seem to work and I get errors.
Can someone please point me to the correct way of achieving this ?
cheers,
Adam
I have some code that I want to switch the ControlSouce property based on
what the user selects.
If btnOwners.Caption = "Show Current Owner" Then
btnOwners.Caption = "Show Owner When Created"
Me!txtPropOwner.ControlSource = "DLookup("[PARCELADDR1]",
"tblPCSProperties", "[LotPlan] = " & "'" & [Forms]![frmRequests]!txtLotPlan
& "'")"
Else
btnOwners.Caption = "Show Current Owner"
Me!txtPropOwner.ControlSource = "ReqOWNER"
End If
The dlookup part doesn't seem to work and I get errors.
Can someone please point me to the correct way of achieving this ?
cheers,
Adam