Default Value

gmatriix

Registered User.
Local time
Today, 15:32
Joined
Mar 19, 2007
Messages
365
Hello All,

I thought that this would be simple but anyways.......I just need a default value of "New" in my [Product ID] field. I went to properties and tried to put in ="New" and I am getting an error.

The only thing I can think of is that I have a event procedure on that field that look like this
Code:
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.[Product ID] = Nz(DMax("[product ID]", "product"), 1000) + 1
End Sub

I know this is probably easy but I am missing it.

Any Ideas?
 
Yes.....didn't think of that.....any Ideas on how to accomplish this?
 
Why do you want to put "NEW" in the productID field? I would suggest adding a Status field to your products table and have that set to NEW. Once the product is no longer NEW you could set it to ACTIVE or something similar.


http://www.accessmssql.com/
 

Users who are viewing this thread

Back
Top Bottom