I would build a table with 1 record in it to hold the check number. I'm not
so sure that I'd allow the system to ask for the first number, because it's
too easy for a human to make a mistake.
Then I'd write a function that would go through all the query records and
put a check number in each one, increasing that number by 1. Something like
this:
Public Function GetNextNum() As Long
On Error GoTo Error_Handler
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = CurrentDb
Set rst = db.OpenRecordset("tblCheckNumber", dbOpenDynaset)
With rst
rst.MoveFirst
rst.Edit
rst!CheckNumber = rst!CheckNumber + 1
rst.Update
End With
GetNextNum = rst!CheckNumber
Exit_Here:
On Error Resume Next
rst.Close
Set rst = Nothing
Set db = Nothing
Exit Function
Error_Handler:
Resume Exit_Here
End Function
Use that function in your query to add numbers to a query column. Since you
said you want to update a check register when you are done, you may want to
make your query into an Append query and append the records to a temporary
table. Run your check printer report on the data in that table and use those
records to update the check register with the check number, date, and
amount. When you are all done printing the checks and updating the register,
delete the records in the temporary table.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
"Lou C" <(E-Mail Removed)> wrote in message
news:57E2B553-93F5-41AE-B09A-(E-Mail Removed)...
>I have set up a query to extract records that are summarized and then a
>check
> is prepared as a report using the detail and totals from the query. They
> will
> probably be sheet fed laser checks. I would request the number of the
> first
> preprinted check to be printed, and use it to print it on the check and to
> eventually load back into the paid record for reconcilation. The starting
> number would be incremented by 1 for each subsequent check printed until
> complete.
> --
> Lou
>
>
> "Arvin Meyer [MVP]" wrote:
>
>> There are multiple ways of doing that. Can you be more specific with what
>> you are looking for?
>> --
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.mvps.org/access
>> http://www.accessmvp.com
>>
>> "Lou C" <(E-Mail Removed)> wrote in message
>> news:8BB6EFC5-96DA-4A04-B4A9-(E-Mail Removed)...
>> >I am developing an application which will print checks. Does a anyone
>> >have
>> >a
>> > formula or function which will request a starting ckeck number and
>> > increment
>> > it to display on the check as they are printed?
>> > Thanks.
>> > --
>> > Lou
>>
>>
>>