See Code Below, Need to Select ALL instead of just one, ???

D

Dave Elliott

This code is used to pay an employee, after clicking on the field CheckNo it
runs the code and a check number is entered and then after selecting
another record manually, that is by clicking on next record you do the same
and so on until you have selected all employees to pay.The employee is
marked as paid as well.
The initial check number is set via another form before you enter this
form.Then you have a starting check number.What I cant figure out is how to
make it auto advance, that is upon click, increment the check number by one
for all the records in one swift click.The check counter works fine except
that I can only do it one record at a time. The code below is split into two
parts, One, the first is used to auto input the check number, save the
record and the run the next section of code, which pays the employee and
advances to the first record. Hope this makes sense. I just want it to enter
the check number into all the records instead of one at a time so I can
batch print them.

Thanks,







Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FSubHours"

If IsNull(Me.CheckDate) Then
Me.CheckDate = Date
End If

If IsNull(Me.[CheckNo]) Then
Me.[CheckNo] = Next_Custom_Counter

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

DoCmd.OpenForm stDocName, , , stLinkCriteria

End If

________________________________________________________________

Forms!FSubHours.Visible = False
DoCmd.GoToRecord , , acFirst

Do Until IsNull([Work Date])
Me.[CheckNo] = [Forms]![FEmpTotHours].[Payroll Check].Form.[CheckNo]
Me.[CheckDate] = [Forms]![FEmpTotHours].[Payroll Check].Form.[CheckDate]
Me.[ChkNoID] = [Forms]![FEmpTotHours].[Payroll Check].Form.[ChkNoID]
Me.[Paid] = -1
Me.[BeginDate] = [Forms]![frmautopayrollreport]![BeginDate]
Me.[EndDate] = [Forms]![frmautopayrollreport]![EndDate]
DoCmd.GoToRecord , , acNext

Loop

[Forms]![FEmpTotHours].Requery

''DoCmd.SetWarnings False
''If [Forms]![FEmpTotHours]![EmpOrCon] = 1 Then
'DoCmd.OpenQuery "QEmpTotHoursAUpdate", acNormal
''ElseIf [Forms]![FEmpTotHours]![EmpOrCon] = 2 Then
''DoCmd.OpenQuery "QEmpTotHoursHourlyConUpDate", acNormal
''ElseIf [Forms]![FEmpTotHours]![EmpOrCon] = 3 Then
''DoCmd.OpenQuery "QEmpTotHoursPerJobConUpDate", acNormal
''DoCmd.SetWarnings True
''End If

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close

--


---------------------------------------------------------------------
This email and any files transmitted with it from Dave Elliott are
confidential and intended solely for the
use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the
sender.
All Mail is pre-scanned with Norton Antivirus 2004 for your protection.

http://[email protected]
 
S

SteveS

Dave,

You need to increment the check number inside the loop.

I don't know where the 'Next_Custom_Counter' Function is located (Class
or standard module), but it would be something like this (Untested AIR
Code!):

'-------< SNIP > ----------------

'create variable to hold check number
Dim varNew_Check_Num as long

Forms!FSubHours.Visible = False
DoCmd.GoToRecord , , acFirst

'get starting check num from the form-control
varNew_Check_Num = [Forms]![FEmpTotHours].[Payroll Check].Form.[CheckNo]

Do Until IsNull([Work Date])

Me.[CheckNo] = varNew_Check_Num
Me.[CheckDate] = [Forms]![FEmpTotHours].[Payroll check].Form.[CheckDate]
Me.[ChkNoID] = [Forms]![FEmpTotHours].[Payroll Check].Form.[ChkNoID]
Me.[Paid] = -1 ' its easier to read if you use TRUE
Me.[BeginDate] = [Forms]![frmautopayrollreport]![BeginDate]
Me.[EndDate] = [Forms]![frmautopayrollreport]![EndDate]
DoCmd.GoToRecord , , acNext

'get the next check number
varNew_Check_Num = Next_Custom_Counter
Loop

'-------< SNIP > ----------------

HTH

Steve
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)


Dave said:
This code is used to pay an employee, after clicking on the field CheckNo it
runs the code and a check number is entered and then after selecting
another record manually, that is by clicking on next record you do the same
and so on until you have selected all employees to pay.The employee is
marked as paid as well.
The initial check number is set via another form before you enter this
form.Then you have a starting check number.What I cant figure out is how to
make it auto advance, that is upon click, increment the check number by one
for all the records in one swift click.The check counter works fine except
that I can only do it one record at a time. The code below is split into two
parts, One, the first is used to auto input the check number, save the
record and the run the next section of code, which pays the employee and
advances to the first record. Hope this makes sense. I just want it to enter
the check number into all the records instead of one at a time so I can
batch print them.

Thanks,







Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FSubHours"

If IsNull(Me.CheckDate) Then
Me.CheckDate = Date
End If

If IsNull(Me.[CheckNo]) Then
Me.[CheckNo] = Next_Custom_Counter

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

DoCmd.OpenForm stDocName, , , stLinkCriteria

End If

________________________________________________________________

Forms!FSubHours.Visible = False
DoCmd.GoToRecord , , acFirst

Do Until IsNull([Work Date])
Me.[CheckNo] = [Forms]![FEmpTotHours].[Payroll Check].Form.[CheckNo]
Me.[CheckDate] = [Forms]![FEmpTotHours].[Payroll Check].Form.[CheckDate]
Me.[ChkNoID] = [Forms]![FEmpTotHours].[Payroll Check].Form.[ChkNoID]
Me.[Paid] = -1
Me.[BeginDate] = [Forms]![frmautopayrollreport]![BeginDate]
Me.[EndDate] = [Forms]![frmautopayrollreport]![EndDate]
DoCmd.GoToRecord , , acNext

Loop

[Forms]![FEmpTotHours].Requery

''DoCmd.SetWarnings False
''If [Forms]![FEmpTotHours]![EmpOrCon] = 1 Then
'DoCmd.OpenQuery "QEmpTotHoursAUpdate", acNormal
''ElseIf [Forms]![FEmpTotHours]![EmpOrCon] = 2 Then
''DoCmd.OpenQuery "QEmpTotHoursHourlyConUpDate", acNormal
''ElseIf [Forms]![FEmpTotHours]![EmpOrCon] = 3 Then
''DoCmd.OpenQuery "QEmpTotHoursPerJobConUpDate", acNormal
''DoCmd.SetWarnings True
''End If

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close
 
D

Dave Elliott

The counter comes from a table (NextAvailableCounter) set to no duplicates
and number format.,
The form Check after entering a starting number goes to the next field which
equals
the next check number, i.e.. NextAvailableCounter +1
Still not quite right, but close.

Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FSubHours"

If IsNull(Me.CheckDate) Then
Me.CheckDate = Date
End If

If IsNull(Me.[CheckNo]) Then
Me.[CheckNo] = Next_Custom_Counter

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If

DoCmd.GoToRecord , , acNext
Do Until IsNull([Work Date])
Do Until IsNull([CheckNo])
Loop

[Forms]![FEmpTotHours].Requery
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close

--


---------------------------------------------------------------------
This email and any files transmitted with it from Dave Elliott are
confidential and intended solely for the
use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the
sender.
All Mail is pre-scanned with Norton Antivirus 2004 for your protection.

http://[email protected]

Dave Elliott said:
This code is used to pay an employee, after clicking on the field CheckNo it
runs the code and a check number is entered and then after selecting
another record manually, that is by clicking on next record you do the same
and so on until you have selected all employees to pay.The employee is
marked as paid as well.
The initial check number is set via another form before you enter this
form.Then you have a starting check number.What I cant figure out is how to
make it auto advance, that is upon click, increment the check number by one
for all the records in one swift click.The check counter works fine except
that I can only do it one record at a time. The code below is split into two
parts, One, the first is used to auto input the check number, save the
record and the run the next section of code, which pays the employee and
advances to the first record. Hope this makes sense. I just want it to enter
the check number into all the records instead of one at a time so I can
batch print them.

Thanks,







Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FSubHours"

If IsNull(Me.CheckDate) Then
Me.CheckDate = Date
End If

If IsNull(Me.[CheckNo]) Then
Me.[CheckNo] = Next_Custom_Counter

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

DoCmd.OpenForm stDocName, , , stLinkCriteria

End If

________________________________________________________________

Forms!FSubHours.Visible = False
DoCmd.GoToRecord , , acFirst

Do Until IsNull([Work Date])
Me.[CheckNo] = [Forms]![FEmpTotHours].[Payroll Check].Form.[CheckNo]
Me.[CheckDate] = [Forms]![FEmpTotHours].[Payroll Check].Form.[CheckDate]
Me.[ChkNoID] = [Forms]![FEmpTotHours].[Payroll Check].Form.[ChkNoID]
Me.[Paid] = -1
Me.[BeginDate] = [Forms]![frmautopayrollreport]![BeginDate]
Me.[EndDate] = [Forms]![frmautopayrollreport]![EndDate]
DoCmd.GoToRecord , , acNext

Loop

[Forms]![FEmpTotHours].Requery

''DoCmd.SetWarnings False
''If [Forms]![FEmpTotHours]![EmpOrCon] = 1 Then
'DoCmd.OpenQuery "QEmpTotHoursAUpdate", acNormal
''ElseIf [Forms]![FEmpTotHours]![EmpOrCon] = 2 Then
''DoCmd.OpenQuery "QEmpTotHoursHourlyConUpDate", acNormal
''ElseIf [Forms]![FEmpTotHours]![EmpOrCon] = 3 Then
''DoCmd.OpenQuery "QEmpTotHoursPerJobConUpDate", acNormal
''DoCmd.SetWarnings True
''End If

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close

--


---------------------------------------------------------------------
This email and any files transmitted with it from Dave Elliott are
confidential and intended solely for the
use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the
sender.
All Mail is pre-scanned with Norton Antivirus 2004 for your protection.

http://[email protected]
 
S

SteveS

The counter comes from a table (NextAvailableCounter) set to no
duplicates
and number format.,

Your check numbers comes from a table with one field that has the check
numbers already entered? Or is the check number created and entered into
the table using 'Next_Custom_Counter'?
If IsNull(Me.[CheckNo]) Then
Me.[CheckNo] = Next_Custom_Counter

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If

Next_Custom_Counter is a Function to return a check number from the
table NextAvailableCounter? What is the code for the function?

What happens if a number is entered into Me.[CheckNo], (so Me.[CheckNo]
is not null), has already been used? Can you enter any number for the
check number? If the last check number was 10300, could 15001 be entered
and the following 5 checks be numbered consecutive?


To be able to "make it auto advance, that is upon click, increment the
check number by one for all the records in one swift click", you need to
increment the check number within the 'Do Loop', like the following
(still untested) code.
Use your table name in the DMax() function.

'-------<Snip>-------
If IsNull(Me.[CheckNo]) Then
'get the Max check num from Me.[CheckNo] in this recordset (table)
Me.[CheckNo] = DMax("[CheckNo]", "FEmpTotHours")
End If

'load the variable
varNew_Check_Num = [Forms]![FEmpTotHours].[Payroll Check].Form.[CheckNo]

Do Until IsNull([Work Date])

'increment the check number
varNew_Check_Num = varNew_Check_Num +1

Me.[CheckNo] = varNew_Check_Num
Me.[CheckDate] = [Forms]![FEmpTotHours].[Payroll check].Form.[CheckDate]
Me.[ChkNoID] = [Forms]![FEmpTotHours].[Payroll Check].Form.[ChkNoID]
Me.[Paid] = True
Me.[BeginDate] = [Forms]![frmautopayrollreport]![BeginDate]
Me.[EndDate] = [Forms]![frmautopayrollreport]![EndDate]

'I think this should be changed to => DoCmd.GoToRecord , , acNewRec

DoCmd.GoToRecord , , acNext

Loop
'-------<Snip>-------


Steve
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)



Dave said:
The counter comes from a table (NextAvailableCounter) set to no duplicates
and number format.,
The form Check after entering a starting number goes to the next field which
equals
the next check number, i.e.. NextAvailableCounter +1
Still not quite right, but close.

Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FSubHours"

If IsNull(Me.CheckDate) Then
Me.CheckDate = Date
End If

If IsNull(Me.[CheckNo]) Then
Me.[CheckNo] = Next_Custom_Counter

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If

DoCmd.GoToRecord , , acNext
Do Until IsNull([Work Date])
Do Until IsNull([CheckNo])
Loop

[Forms]![FEmpTotHours].Requery
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close
 
D

Dave Elliott

Yes, the check number comes from a table that has one number in it. It is
set to no duplicates.
Table name is CounterTable, field is named NextAvailableCounter
indexed yes no duplicates.
The form where the starting number is entered is named Check, it has
two fields on it and its record source is
CheckCounter which has a control named CheckNo in it you enter whatever
starting check number you want in the control
NextAvailableCounter and then after tabbing out of field it autoinputs the
next check number into the other field
which has its control source set to =[NextAvailableCounter]+1
This is a sub-form on another from name frmautopayroll which after setting
the starting dates for the payroll week
and the starting check number opens the form femptothours where you see the
payroll checks.
Here is where the code starts to run, when this form is closed, i.e.
frmautopayroll
On Error GoTo Err_Label39_Click

DoCmd.Close acForm, "FEmpTotHours"

DoCmd.OpenForm "FEmpTotHours", acNormal, "",
"[EmpOrCon]=Forms!frmAutoPayrollReport!EmpOrCon", , acNormal

Exit_Label39_Click:
Exit Sub

Err_Label39_Click:
MsgBox Err.Description
Resume Exit_Label39_Click

The next form femptothours has a sub-form on it named Check which has two
fields.
CheckNo and CheckDate
When you click on the field CheckNo it runs the next set of code which
inputs the check number plus 1 that you already
entered on the sub-form on the main form frmautopayroll. It then runs the
next set of code.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FSubHours"

If IsNull(Me.CheckDate) Then
Me.CheckDate = Date
End If

If IsNull(Me.[CheckNo]) Then
Me.[CheckNo] = Next_Custom_Counter

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

DoCmd.OpenForm stDocName, , , stLinkCriteria

End If

After opening the next form which is named FSubHours it runs the next set of
code when this form closes.
Dim varNew_Check_Num As Long

Forms!FSubHours.Visible = False
DoCmd.GoToRecord , , acFirst

'get starting check num from the form-control
varNew_Check_Num = [Forms]![FEmpTotHours].[Payroll Check].Form.[CheckNo]

Do Until IsNull([Work Date])

Me.[CheckNo] = varNew_Check_Num
Me.[CheckDate] = [Forms]![FEmpTotHours].[Payroll Check].Form.[CheckDate]
Me.[ChkNoID] = [Forms]![FEmpTotHours].[Payroll Check].Form.[ChkNoID]
Me.[Paid] = -1
Me.[BeginDate] = [Forms]![frmautopayrollreport]![BeginDate]
Me.[EndDate] = [Forms]![frmautopayrollreport]![EndDate]
DoCmd.GoToRecord , , acNext

'get the next check number
varNew_Check_Num = Next_Custom_Counter
Loop

[Forms]![FEmpTotHours].Requery



DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close

This essentially pays the employee, adds the check number, and it is ready
to do the same thing to the next check.
You have to do this one at a time, which is what I want to get away from.
So the table CounterTable only has one number in it at any given time
It does not remember what number you used last, just the form has the number
that you used last on it until you change it.
So you could actually have a duplicate check number, just not in that check
session. i.e. Payroll Period.
Hope this explains it better, the db is quite intense on dates.
Also on the form Check there are two additional controls named ChkNoID
and EmployeeID
So the check number is tracked by ChkNoID and EmployeeID.

Thanks,

Dave
P.S. If you have to see this in action I can zip a sample db for you too
look at.


--


---------------------------------------------------------------------
This email and any files transmitted with it from Dave Elliott are
confidential and intended solely for the
use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the
sender.
All Mail is pre-scanned with Norton Antivirus 2004 for your protection.

http://[email protected]

SteveS said:
The counter comes from a table (NextAvailableCounter) set to no duplicates
and number format.,

Your check numbers comes from a table with one field that has the check
numbers already entered? Or is the check number created and entered into
the table using 'Next_Custom_Counter'?
If IsNull(Me.[CheckNo]) Then
Me.[CheckNo] = Next_Custom_Counter

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If

Next_Custom_Counter is a Function to return a check number from the
table NextAvailableCounter? What is the code for the function?

What happens if a number is entered into Me.[CheckNo], (so Me.[CheckNo]
is not null), has already been used? Can you enter any number for the
check number? If the last check number was 10300, could 15001 be entered
and the following 5 checks be numbered consecutive?


To be able to "make it auto advance, that is upon click, increment the
check number by one for all the records in one swift click", you need to
increment the check number within the 'Do Loop', like the following
(still untested) code.
Use your table name in the DMax() function.

'-------<Snip>-------
If IsNull(Me.[CheckNo]) Then
'get the Max check num from Me.[CheckNo] in this recordset (table)
Me.[CheckNo] = DMax("[CheckNo]", "FEmpTotHours")
End If

'load the variable
varNew_Check_Num = [Forms]![FEmpTotHours].[Payroll Check].Form.[CheckNo]

Do Until IsNull([Work Date])

'increment the check number
varNew_Check_Num = varNew_Check_Num +1

Me.[CheckNo] = varNew_Check_Num
Me.[CheckDate] = [Forms]![FEmpTotHours].[Payroll check].Form.[CheckDate]
Me.[ChkNoID] = [Forms]![FEmpTotHours].[Payroll Check].Form.[ChkNoID]
Me.[Paid] = True
Me.[BeginDate] = [Forms]![frmautopayrollreport]![BeginDate]
Me.[EndDate] = [Forms]![frmautopayrollreport]![EndDate]

'I think this should be changed to => DoCmd.GoToRecord , , acNewRec

DoCmd.GoToRecord , , acNext

Loop
'-------<Snip>-------


Steve
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)



Dave said:
The counter comes from a table (NextAvailableCounter) set to no duplicates
and number format.,
The form Check after entering a starting number goes to the next field which
equals
the next check number, i.e.. NextAvailableCounter +1
Still not quite right, but close.

Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FSubHours"

If IsNull(Me.CheckDate) Then
Me.CheckDate = Date
End If

If IsNull(Me.[CheckNo]) Then
Me.[CheckNo] = Next_Custom_Counter

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If

DoCmd.GoToRecord , , acNext
Do Until IsNull([Work Date])
Do Until IsNull([CheckNo])
Loop

[Forms]![FEmpTotHours].Requery
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close
 
S

SteveS

Dave,
I you wouldn't mind, I would like to see the sample database. I will be
able to try code changes to make sure it will work.

Thanks,

Steve
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)


Dave said:
Yes, the check number comes from a table that has one number in it. It is
set to no duplicates.
Table name is CounterTable, field is named NextAvailableCounter
indexed yes no duplicates.
The form where the starting number is entered is named Check, it has
two fields on it and its record source is
CheckCounter which has a control named CheckNo in it you enter whatever
starting check number you want in the control
NextAvailableCounter and then after tabbing out of field it autoinputs the
next check number into the other field
which has its control source set to =[NextAvailableCounter]+1
This is a sub-form on another from name frmautopayroll which after setting
the starting dates for the payroll week
and the starting check number opens the form femptothours where you see the
payroll checks.
Here is where the code starts to run, when this form is closed, i.e.
frmautopayroll
On Error GoTo Err_Label39_Click

DoCmd.Close acForm, "FEmpTotHours"

DoCmd.OpenForm "FEmpTotHours", acNormal, "",
"[EmpOrCon]=Forms!frmAutoPayrollReport!EmpOrCon", , acNormal

Exit_Label39_Click:
Exit Sub

Err_Label39_Click:
MsgBox Err.Description
Resume Exit_Label39_Click

The next form femptothours has a sub-form on it named Check which has two
fields.
CheckNo and CheckDate
When you click on the field CheckNo it runs the next set of code which
inputs the check number plus 1 that you already
entered on the sub-form on the main form frmautopayroll. It then runs the
next set of code.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FSubHours"

If IsNull(Me.CheckDate) Then
Me.CheckDate = Date
End If

If IsNull(Me.[CheckNo]) Then
Me.[CheckNo] = Next_Custom_Counter

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

DoCmd.OpenForm stDocName, , , stLinkCriteria

End If

After opening the next form which is named FSubHours it runs the next set of
code when this form closes.
Dim varNew_Check_Num As Long

Forms!FSubHours.Visible = False
DoCmd.GoToRecord , , acFirst

'get starting check num from the form-control
varNew_Check_Num = [Forms]![FEmpTotHours].[Payroll Check].Form.[CheckNo]

Do Until IsNull([Work Date])

Me.[CheckNo] = varNew_Check_Num
Me.[CheckDate] = [Forms]![FEmpTotHours].[Payroll Check].Form.[CheckDate]
Me.[ChkNoID] = [Forms]![FEmpTotHours].[Payroll Check].Form.[ChkNoID]
Me.[Paid] = -1
Me.[BeginDate] = [Forms]![frmautopayrollreport]![BeginDate]
Me.[EndDate] = [Forms]![frmautopayrollreport]![EndDate]
DoCmd.GoToRecord , , acNext

'get the next check number
varNew_Check_Num = Next_Custom_Counter
Loop

[Forms]![FEmpTotHours].Requery



DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close

This essentially pays the employee, adds the check number, and it is ready
to do the same thing to the next check.
You have to do this one at a time, which is what I want to get away from.
So the table CounterTable only has one number in it at any given time
It does not remember what number you used last, just the form has the number
that you used last on it until you change it.
So you could actually have a duplicate check number, just not in that check
session. i.e. Payroll Period.
Hope this explains it better, the db is quite intense on dates.
Also on the form Check there are two additional controls named ChkNoID
and EmployeeID
So the check number is tracked by ChkNoID and EmployeeID.

Thanks,

Dave
P.S. If you have to see this in action I can zip a sample db for you too
look at.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top