:banghead:
Not sure whats going on here, nothing on the table that stops this from working. I just get Run-time error "2448 You can't assign a value to this object" When the code runs.
Any ideas what I am doing wrong?
Not sure whats going on here, nothing on the table that stops this from working. I just get Run-time error "2448 You can't assign a value to this object" When the code runs.
Any ideas what I am doing wrong?
Code:
Private Sub Form_Open(Cancel As Integer)
Dim rst As DAO.Recordset
MySQL = " Select max(ID) from TblUserQry"
Set rst = CurrentDb.OpenRecordset(MySQL)
Myid = rst.Fields(0) + Int(Rnd(1) * 10)
Me.txtMyID.Value = Myid
End Sub