Ok first let me say, before i started anything on the data base, i saved it in the 2002-2003 format. Now with that said let me give some details of the problem. (I have highlighted code and errors in red to try and help keep it from being so jumbled)
1. I have a field identified as "Submitted By" which captures the computer name that the form is being filled out from and automatically populates it. It uses the following module:
Function udfGetUserName() As String
On Error GoTo err_udfGetUserName
Dim strUserName As String
strUserName = Environ("username")
exit_udfGetUserName:
udfGetUserName = strUserName
Exit Function
err_udfGetUserName:
strUserName = ""
Resume exit_udfGetUserName
End Function
Then in the default value field i have :
=udfGetUserName()
Now this works fine when working from a computer with access 2007, however in 2003 i get the error :
Compile Error: Can not find project or library
When Looking at the debugger it specificlly highlights the Environ in the line strUserName = Environ("username")
-----------------------------------------------------------------------
2.I have 2 seperate fields on the form that populate date and time with the following default values
=Date()
=Time()
Again, these work fine in the 2007 version, and not in the 2003. I even went in on a 2003 machine and used the build expression function for date to verify i had the correct formatting, still in these to fields it only gives the following info when the form is started:
#Name?
-----------------------------------------------------------------------
3. I have a Customer Number Combo box the user can select from. On update of that field i have the following lookup preformed to auto populate 3 other fields. The after update code looks like this
Private Sub Combo165_AfterUpdate()
Dim HOLD As String
Text121 = Nz(DLookup("[EMAIL]", "Customers", "[Forms]![ProblemLogCustomer]![Combo165] = NANUM"))
HOLD = Nz(DLookup("[PHONE]", "Customers", "[Forms]![ProblemLogCustomer]![Combo165] = NANUM"))
CustPhoneNo = Left(HOLD, 12)
CustomerContact = Nz(DLookup("[CONTACT]", "Customers", "[Forms]![ProblemLogCustomer]![Combo165] = NANUM"))
End Sub
This works great for the 2007 versions, not at all on the 2003. I get the following error:
Compile Error: Can not find project or library
With that error it specificly highlights the Left in the following line of code:
CustPhoneNo = Left(HOLD, 12)
I understand there is a lot of info listed, and that I may have left out some important parts in trying to describe the problem. Please fill free to ask any questions and i will do my best to anwser them. Just for informational purposes, this is desgined to be a Help Desk/Ticket program for our company to log issues both internally as well as at the customer level. Thanks in advance for any help!