Change Check # On Print?

  • Thread starter Thread starter Chaster
  • Start date Start date
C

Chaster

I have a tblCheckNumber with 1 field [LCN] which will store the Last Check
Number that was printed.

I am not sure if what I want to do should be done on the On Print or On
Format so your advise here would be appreciated.

Every time a new check is printed I want to update the value in the
tblCheckNumber by 1.

Starting value in tblCheckNumber = 10
1st Check prints and updates tblCheckNumber![LCN] = 11
2nd Check prints and updates tbleCheckNumber![LCN] = 12
etc, etc.

TIA
 
I recommend against changing data using a report. Can't you update the
number in the table and then print the check?
 
This is a copy of the post I just sent to the queries goup

I am attempting to do a check writing routine and need help with updating
some of the fields in my table.

I am working with two tables

tblLastCheck![LCN]

tblAccountsPayable
[DatePaid]
[CheckNumber]
[SupplierID]

I want to store the value that is in the tblLastCheckNumber![LCN] and add 1
to it
IE: tblLastCheck![LCN] = 100

Dim UpdatedLCN as long
UpdatedLCN =DlookUp ("LCN","tblLastCheck") ' This is a 1 field table

I then need to find the records that match the [SupplierID]= "ATE" on the
1st check that is printed and update
[DatePaid] = Date()
[CheckNumber] = UpdatedLCN ' This would be check number 101

I then need to update the variable UpdatedLCN
UpdatedLCN = UpdatedLCN + 1

find the records that match the 2nd checks [SupplierID] = "D&N"
[DatePaid] = Date()
[CheckNumber] = UpdatedLCN ' This would be check number 102

etc, etc

And then I would think that I need to set the value in my tblLastCheck![LCN]
= UpdatedLCN

I could use advise on when this should be run (prior to printing checks)? on
the onformat or onprint when printing the checks? or after the checks have
been printed? and of course help with the syntax to accomplish this routine.
TIA
 
Back
Top