Hi,
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 "programmavaria belen" 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:
It stops at My.table.open etc. , and states "object required"
Does anyone see what we overlook?
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 "programmavaria belen" 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:
Code:
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?
Comment