jackie77
Jackie
- Local time
- Today, 16:26
- Joined
- Jul 18, 2007
- Messages
- 85
Hi all
Its been a while since I have been on here in fact its been a while since i have been using access and as usual I am stuck on one thing that I have been working on for hours trying different things to get it to work so hope someone could give me some advice please bear in mind I'm still a novice
The problem is:
i have a form that displays a number of property details (from a query) and on the form I have a number of unbound fields that i am trying to use vba to look up another table to see if a tenant is currently living in the property (as the table tenancy displays all tenant past and present) I have been using the following code which i know is wrong
but does anyone have any suggestions I have tried various codes but cant get it to work!!
Private Sub Form_Load()
Dim strtest As String
strtest = Me.PropertyID.Value
Me.Forename = "SELECT "Tenancy.PropertyID FROM Tenancy " & _
"WHERE Tenancy.PropertyID = " & strtest & ";"
End Sub
Cheers
Jackie
Its been a while since I have been on here in fact its been a while since i have been using access and as usual I am stuck on one thing that I have been working on for hours trying different things to get it to work so hope someone could give me some advice please bear in mind I'm still a novice
The problem is:
i have a form that displays a number of property details (from a query) and on the form I have a number of unbound fields that i am trying to use vba to look up another table to see if a tenant is currently living in the property (as the table tenancy displays all tenant past and present) I have been using the following code which i know is wrong
Private Sub Form_Load()
Dim strtest As String
strtest = Me.PropertyID.Value
Me.Forename = "SELECT "Tenancy.PropertyID FROM Tenancy " & _
"WHERE Tenancy.PropertyID = " & strtest & ";"
End Sub
Cheers
Jackie