This is an updated version of my earlier post, hoping to attract new readers/answers.
I want on opening my form, to check wether a field [res3] in the one-record table "programmavariabelen" is empty, and if it is, to fill it (that is of course, being the table designed to be one-record, in the first and only record) with a random integer.
This is where Zwoker has lead me to so far:
Expand|Select|Wrap|Line Numbers
- Private Sub Form_Load()
- If IsNull(DLookup("[res3]", "programmavariabelen")) Then
- MsgBox "res3 is empty"
- Randomize
- MyTable.Open "programmavariabelen", CurrentProject.Connection, adOpenStatic, adLockOptimistic
- MyTable.MoveFirst
- MyTable![res3] = Rnd()
- MyTable.Update
- MyTable.Close
- MsgBox (Me![res3])
- End If
- End Sub
Does anyone see what we overlook?