I am trying to use this VBA to add the next system generated userID from table tblUsers to my form. tbox1 has a control source set, but I want to populate it with the below syntax, altho I get an error. What is causing this error? This is not an autonumber field, or a PK field. And if I display the DMAX() value in a MsgBox it shows exactly as it should.
And I am calling this from the vBA syntax ONLoad() for the form.
You can't assign a value to this objectCode:Me!tbox1.Value = DMax("userID", "tblUsers") + 1