47redlands
Programmer
Hello I have a form called:
Add a new customer. This form will be used by a receptionist. This form will collect the customer details in tblCustomer. It will allow the receptionist to enter first name and last. When last name is entered it should generate a customer ID called custID. This is the code I have typed in in MS Access 2007.
CustID=Upper(Left([Lastname],3)) & format(DCount("custid","tblCustomer","000"))
This is how I did it by selecting the Lastname bound control, go to its Property Sheet--> Events tab --> After Update. Click on the ellipsis (three dots), select Code Builder and entered the code above.
Now when I go to test the form it says: You must enter a value in tblCustomer.CustID field.
Please help me.
Add a new customer. This form will be used by a receptionist. This form will collect the customer details in tblCustomer. It will allow the receptionist to enter first name and last. When last name is entered it should generate a customer ID called custID. This is the code I have typed in in MS Access 2007.
CustID=Upper(Left([Lastname],3)) & format(DCount("custid","tblCustomer","000"))
This is how I did it by selecting the Lastname bound control, go to its Property Sheet--> Events tab --> After Update. Click on the ellipsis (three dots), select Code Builder and entered the code above.
Now when I go to test the form it says: You must enter a value in tblCustomer.CustID field.
Please help me.