automaticbaby
Technical User
I'm not that familiar with writing an sql statement, so I cheated. I created a query and then copied the statement, with some changes, to VB in the form I want need the code. The sql works in the query, but it doesn't work in the form.
Here's the code from the query:
SELECT Individual.[First Name], UserID.UserID
FROM UserID INNER JOIN Individual ON UserID.IndividualNo = Individual.IndividualNo
WHERE (((UserID.UserID)="xxxxxxxxxxxx"
);
This the code in the form:
RPFirstName = "SELECT Individual.First Name, UserID.UserID FROM UserID INNER JOIN Individual ON UserID.IndividualNo = Individual.IndividualNo WHERE (((UserID.UserID)= " & Forms![Error Form]!RPID & "
);"
The textbox RPFirstName is always showing what is written between the quotation marks. How can I get the result from this query to pop up in the textbox?
Thanks
Here's the code from the query:
SELECT Individual.[First Name], UserID.UserID
FROM UserID INNER JOIN Individual ON UserID.IndividualNo = Individual.IndividualNo
WHERE (((UserID.UserID)="xxxxxxxxxxxx"
This the code in the form:
RPFirstName = "SELECT Individual.First Name, UserID.UserID FROM UserID INNER JOIN Individual ON UserID.IndividualNo = Individual.IndividualNo WHERE (((UserID.UserID)= " & Forms![Error Form]!RPID & "
The textbox RPFirstName is always showing what is written between the quotation marks. How can I get the result from this query to pop up in the textbox?
Thanks