T
TimH
Thank you in advance
My code (with help from John Spencer) works as an example however when I
attach it to my form I have runTime-errorrs
Public Function BuildKey()
Dim strTmp As String
Dim dtVisitDate As Date
Dim strSSN As String
Dim Build_Key_ As String
strTmp = InputBox("Please enter visit Date Here:", "Visit Date")****when I
try to
*strTmp= Me.VisitDate--this is bound to visit date on Table of Patients
If IsDate(strTmp) Then
dtVisitDate = DateValue(strTmp)
strTmp = Format(dtVisitDate, "mmddyyyy") 'yyyymmdd
End If
strTmp = strTmp & "-"
strSSN = InputBox("Please enter Full SSN here:", "SSN")***
*strTmp = Me.SSN this is bound to SSN of tblPatients
' OK so it works, I used the code below to take a full SSN
' and convert it to the last 4
strSSN = Right(strSSN, 4)
strTmp = strTmp & strSSN
Build_Key_ = strTmp
Debug.Print strTmp
'Debug.Print Build_Key_
MsgBox "your key is:" & Build_Key_***this is KEY bound to tblPatient
End Function
what am I doing wrong?
once again thank you.
My code (with help from John Spencer) works as an example however when I
attach it to my form I have runTime-errorrs
Public Function BuildKey()
Dim strTmp As String
Dim dtVisitDate As Date
Dim strSSN As String
Dim Build_Key_ As String
strTmp = InputBox("Please enter visit Date Here:", "Visit Date")****when I
try to
*strTmp= Me.VisitDate--this is bound to visit date on Table of Patients
If IsDate(strTmp) Then
dtVisitDate = DateValue(strTmp)
strTmp = Format(dtVisitDate, "mmddyyyy") 'yyyymmdd
End If
strTmp = strTmp & "-"
strSSN = InputBox("Please enter Full SSN here:", "SSN")***
*strTmp = Me.SSN this is bound to SSN of tblPatients
' OK so it works, I used the code below to take a full SSN
' and convert it to the last 4
strSSN = Right(strSSN, 4)
strTmp = strTmp & strSSN
Build_Key_ = strTmp
Debug.Print strTmp
'Debug.Print Build_Key_
MsgBox "your key is:" & Build_Key_***this is KEY bound to tblPatient
End Function
what am I doing wrong?
once again thank you.