G
Guest
I've read thru countless threads, but I can't seem to get my code to work.
My office handle hundreds of correspondence, only some of which get filed.
While I can easily use autonumber for each piece of paper that come thru, I
need a meaningful number for my file system that is sequential. I've tried
the following code, but it does not work. Can someone offer some advice?
My table is "Correspondence". The Form is "Correspondence Log." The cell
which stores the file numbers is "File#". I've called my toggle button
"Assign File#" which also stores a flag in a cell called "Filed"
If IsNull (File#) = True Then File# = Dmax("[File#]", "Correspondence") +1
I've tried this code in both before and after update. I've also tried it
using If File# = "0" which tends to pop up in the field despite the null
default.
Any suggestions?
My office handle hundreds of correspondence, only some of which get filed.
While I can easily use autonumber for each piece of paper that come thru, I
need a meaningful number for my file system that is sequential. I've tried
the following code, but it does not work. Can someone offer some advice?
My table is "Correspondence". The Form is "Correspondence Log." The cell
which stores the file numbers is "File#". I've called my toggle button
"Assign File#" which also stores a flag in a cell called "Filed"
If IsNull (File#) = True Then File# = Dmax("[File#]", "Correspondence") +1
I've tried this code in both before and after update. I've also tried it
using If File# = "0" which tends to pop up in the field despite the null
default.
Any suggestions?