How do I get the number to start at 1 and not 0?
Option Compare Database
' Declaration section
Public AutoNumber As Long
Function SeqAutoNumber(i As Variant) As Variant
SeqAutoNumber = AutoNumber
AutoNumber = AutoNumber + 1
End Function
User Profile
Collapse
-
Auto Number Module for Query
-
Already figured it out thanks. -
VBA Date Problem
I am having great difficulty trying to resolve this. WCCNF1 should turn to yes for previous dates in 2015 not 2016. I cant get it to work using -1. If Year = 2015 it should turn to Yes. Can anyone help me?
If (Year(Nz([WCCClmDt1])) = Year(Date)()) Then
WCCNF1 = "Yes"
ElseIf (Year(Nz([WCCMRDt1])) = Year(Date)()) And _
(Year(Nz([wccmrdtwgt])) = Year(Date)()) And _
(Year(Nz([wccmrdthgt])) = Year(Date)())... -
Im trying to integrate into the current logic but it is turning to yes for each year. If its 2017, it should be for previous year.
If (Year(Nz([WCCClmDt1])) = 2016) Then
WCCNF1 = "Yes"
ElseIf (Year(Nz([WCCMRDt1])) = 2016) And _
(Year(Nz([wccmrdtwgt])) = 2016) And _
(Year(Nz([wccmrdthgt])) = 2016) Then
WCCNF1 = "Yes"
Else
WCCNF1 = "No"
End IfLeave a comment:
-
No activity results to display
Show More
Leave a comment: