=Nz(DMax("[P O #]","Apollo Purchase Orders"),0) + 1
In design view of you form, click on you P O # control, select properties,
select Default Value and put the line of code above in it. If you have
problems with it, let me know and give me details and error descriptions so
we ca debug it.
Now, some pointers:
Avoid using any thimg other than letters, digits, and the underscore ( _ )
in names.
Use different names for different objects so you know what it is easily
Like instead of P O # use PO_NUMBER ( most database developers will
recognize this as a field name because it is all uppercase and has an _ in it.
for control names, use a prefix that easily identifies it. Look for a copy
of "The Leszynski/Reddick Guidelines for Microsoft Access". I think you can
find it on MSDN.
For a text box, for example, a text box is usually prefixed with txt. For
example:
txtPONumber
Let me know how it works out
JennBard1 said:
The table name is: Apollo Purchase Orders
The Control Name is: P O #
the field that carries the p o is: P O #
:
Please post back you code, the name of your table, the name of the control
where the PO is on your form, and the name of the field that carries the PO
number, and we will see if we can get it working.