Default Value

  • Thread starter Thread starter Chris
  • Start date Start date
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
 
Chris,
Just try this in Default... use your own names...
=DMax("[WONumber]","tblWorkOrd") +1
hth
Al Camp
 
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


.
 
Back
Top