intrep11
Registered User.
- Local time
- Today, 05:05
- Joined
- Apr 6, 2003
- Messages
- 63
please can someone look at this and tell me why i am not getting the 001 that i want when there is not entry matching the query
code in the onload section of page
'generate the message no fom a query +1
If DMax("[IDLocal]", "[tblSentEmail]", "[tblSentEmail]![Ship]=Forms![frmMessaggeType]![Combo23]") = Null Or DMax("[IDLocal]", "[tblSentEmail]", "[tblSentEmail]![Ship]=Forms![frmMessaggeType]![Combo23]") = "" Then
Me.IDLocal = "001"
Else
IDLocal = DMax("[IDLocal]", "[tblSentEmail]", "[tblSentEmail]![Ship]=Forms![frmMessaggeType]![Combo23]") + 1
End If
if there is a number in the tblsentemail it works and increments by one if there isnt an entry all i get is a blank box. even though checking the immediate window i get null.
code in the onload section of page
'generate the message no fom a query +1
If DMax("[IDLocal]", "[tblSentEmail]", "[tblSentEmail]![Ship]=Forms![frmMessaggeType]![Combo23]") = Null Or DMax("[IDLocal]", "[tblSentEmail]", "[tblSentEmail]![Ship]=Forms![frmMessaggeType]![Combo23]") = "" Then
Me.IDLocal = "001"
Else
IDLocal = DMax("[IDLocal]", "[tblSentEmail]", "[tblSentEmail]![Ship]=Forms![frmMessaggeType]![Combo23]") + 1
End If
if there is a number in the tblsentemail it works and increments by one if there isnt an entry all i get is a blank box. even though checking the immediate window i get null.