Ok i have a registration form which has the following text boxes
Firstname
Lastname
Username
The username text box is generated by this VB code which is entered in the "got focus" part of a CMD button. The command button was set up using the window which pops up when you first put it on the form and i used "add new record" option
I then want what is typed in these text boxes to go to the table of records
this is the VB used to generate the username
Me.Username = Left(Me.Firstname, 3) + Left(Me.Lastname, 1) + Str(DMax("right(Username, 3)", "table") + 1)
My question is that when i click the button it generates the username but then doesn't add it to the table
Does anyone know any reasons why this would happen or suggestions of how i could make it better bare in mind this has to be done in an exam so please no long VB code thanks you