Ok...so here's what I have boiled down to...
Public Function CvtEmpName(strIDNo)
' Converts an employee number into a name
Dim stringname As String
stringname = ("SELECT EmployeeInfo.FullName FROM EmployeeInfo WHERE EmployeeID =" & (strIDNo))
CvtEmpName = stringname
End Function
So...to refresh everyone's memory (HAHAHA) what I want to do is pull up the employes name based off their id number to print it out on the report. Only now, what it tells me is that the data being passed is too long for the field. So when I put CvtEmpName out in a message box for me to see, what it is showing is the entire Select statement. So..CvtEmpName has the Select statement stored in it rather than the name!!! AAARRRRGGGGHHHHH!!!! What am I doing wrong???? How can I fix this code?????? Please..anyone...can you help me!!!!?????? PLEASE!!!
Thanks,
Syl
Public Function CvtEmpName(strIDNo)
' Converts an employee number into a name
Dim stringname As String
stringname = ("SELECT EmployeeInfo.FullName FROM EmployeeInfo WHERE EmployeeID =" & (strIDNo))
CvtEmpName = stringname
End Function
So...to refresh everyone's memory (HAHAHA) what I want to do is pull up the employes name based off their id number to print it out on the report. Only now, what it tells me is that the data being passed is too long for the field. So when I put CvtEmpName out in a message box for me to see, what it is showing is the entire Select statement. So..CvtEmpName has the Select statement stored in it rather than the name!!! AAARRRRGGGGHHHHH!!!! What am I doing wrong???? How can I fix this code?????? Please..anyone...can you help me!!!!?????? PLEASE!!!
Thanks,
Syl