J
James via AccessMonster.com
Hi all,
I developed a database in Access 97. MsgBox works fine in Access 97, but
will only display part of strings (truncated??) in Access 2003 instead of
full of them.
I wonder if MsgBox has length limitation in Access 2003?
Below is the code, Could you please help me to fix it?
Thank you very much in advance.
----------------------------------------------------------------
Set rsTemp = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)
strLastComp = ""
Do While Not rsTemp.EOF
dtmExpiration = rsTemp![ExpirationDate]
varRetVal = DateDiff("d", dtmDate, dtmExpiration)
texp = DatePart("yyyy", dtmExpiration)
tnow = DatePart("yyyy", dtmNow)
strCompany = rsTemp![Company]
strmsg = strmsg + Chr(10) + rsTemp![Company] & "'s maintenance
agreement for " & rsTemp![Product] & " expires in " & varRetVal & " days."
' + Chr(10)
rsTemp.MoveNext
Loop
If strmsg <> "" Then
MsgBox strmsg, vbInformation, "Maintenance Agreement"
End If
I developed a database in Access 97. MsgBox works fine in Access 97, but
will only display part of strings (truncated??) in Access 2003 instead of
full of them.
I wonder if MsgBox has length limitation in Access 2003?
Below is the code, Could you please help me to fix it?
Thank you very much in advance.
----------------------------------------------------------------
Set rsTemp = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)
strLastComp = ""
Do While Not rsTemp.EOF
dtmExpiration = rsTemp![ExpirationDate]
varRetVal = DateDiff("d", dtmDate, dtmExpiration)
texp = DatePart("yyyy", dtmExpiration)
tnow = DatePart("yyyy", dtmNow)
strCompany = rsTemp![Company]
strmsg = strmsg + Chr(10) + rsTemp![Company] & "'s maintenance
agreement for " & rsTemp![Product] & " expires in " & varRetVal & " days."
' + Chr(10)
rsTemp.MoveNext
Loop
If strmsg <> "" Then
MsgBox strmsg, vbInformation, "Maintenance Agreement"
End If