I keep getting an error when I try to format this number. I've done it in VBA before and I tried to change the SOPID to a variant, a string, and an integer.


    Dim SOPID As Integer
    SOPID = DMax("file_id", "tblSOP") + 1
        
    'Output test data
    MsgBox (format(SOPID, "000"))
I have no idea what I am doing wrong.