I am using some code to retrieve a value to become the value of a text box. Am i right in thinking that when using DLookup NULL values have to be handled whereas by using a SELECT statement I dont have to worry about NULL throwing up an error?
If so, having constructed the following code, how do I direct the value obtained by the SELECT statement, to show up as a value in a text box?
If so, having constructed the following code, how do I direct the value obtained by the SELECT statement, to show up as a value in a text box?
Code:
Dim strSQL As String
Dim ValCustID As Integer
ValCustID = Me.CustID.Value
strSQL = "SELECT TblRadData.CustMacAddress " & _
"FROM tblRadData " & _
"WHERE tblRadData.TblcustID='" & ValCustID & "';"