Default Value

C

Chris

When a new record is created, I would like to populate the
WO Number control with the next sequential WO number
(i.e., the value of the highest WO number in the table
+1). The query states: SELECT ((Max(WorkOrd.[WO Number]))
+1) AS [WO Number] FROM WorkOrd;

I have entered the default value in the control as
=[WorkOrdNoQuery]![WO Number].

When I open the form and add a new record, get error "Item
not found in this collection."

Any ideas?

Chris
 
A

AlCamp

Chris,
Just try this in Default... use your own names...
=DMax("[WONumber]","tblWorkOrd") +1
hth
Al Camp
 
C

cihaas

Al,

Thank you!!!!!!
-----Original Message-----
Chris,
Just try this in Default... use your own names...
=DMax("[WONumber]","tblWorkOrd") +1
hth
Al Camp

Chris said:
When a new record is created, I would like to populate the
WO Number control with the next sequential WO number
(i.e., the value of the highest WO number in the table
+1). The query states: SELECT ((Max(WorkOrd.[WO Number]))
+1) AS [WO Number] FROM WorkOrd;

I have entered the default value in the control as
=[WorkOrdNoQuery]![WO Number].

When I open the form and add a new record, get error "Item
not found in this collection."

Any ideas?

Chris


.
 

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