Recent content by clio

  1. C

    Incrementing Invoice number on form - Rookie with code

    a bit more investigation led to the fact I'd renamed the command button, but the code was not automatically updated. Updated the code and got an error. I added this: Exit Sub Err_CREATEINVNUM_Click: MsgBox Err.Description Resume Exit_CREATEINVNUM_Click End Sub at the end and am...
  2. C

    Incrementing Invoice number on form - Rookie with code

    It was your code - I got it from the sample database! thanks for stepping in... right, I've tried this: Private Sub Command44_Click() -- button to create invoice number On Error GoTo Err_Command44_Click Dim NextNo As Long Dim rs As DAO.Recordset Set rs = CurrentDb.OpenRecordset("SELECT...
  3. C

    Incrementing Invoice number on form - Rookie with code

    Thanks - that is excellent clarification. Would you mind helping me understand the code in the first solution - I have done a bit of basic copy and paste code writing so could follow and apply an explanation (I hope)
  4. C

    Incrementing Invoice number on form - Rookie with code

    Thanks RG. I found this Have two fields in your table: DateEntered - Date field, form does not allow entry, Default Value --> Date() ControlNumber - Long Integer, form does not allow entry, value assigned by the form's BeforeInsert event. ControlNumber = Nz(DMax("[ControlNumber]"...
  5. C

    Incrementing Invoice number on form - Rookie with code

    Hello, I would like to add a button to my form that will generate a new invoice number with the year and an incrementing number, that will work across all organisation records (so whichever company I create the invoice for, the same number won't be reused). I have been through the forum...
Back
Top Bottom