K
kubotakid
Dim dbConn As ADODB.Connection
Dim recSet As ADODB.Recordset
Set dbConn = CurrentProject.Connection
Set recSet = New ADODB.Recordset
recSet.CursorLocation = adUseServer
recSet.CursorType = adOpenKeyset
recSet.LockType = adLockOptimistic
recSet.Open "
Dim recSet As ADODB.Recordset
Set dbConn = CurrentProject.Connection
Set recSet = New ADODB.Recordset
recSet.CursorLocation = adUseServer
recSet.CursorType = adOpenKeyset
recSet.LockType = adLockOptimistic
recSet.Open "
", dbConn, , , adCmdTable
recSet.AddNew ' Start a new record
recSet!des = Me.IMAGEFILE
recSet!Size = Me.PRODUCT
recSet.Update ' Post the new record
recSet.Close
Set recSet = Nothing
dbConn.Close
This is from a comand button. It works to add a record but it does not
update the table in the subform. after closing the form I see the data in
the table after re opening it. How do I make it update after the this code.
I've read the the ADO needs to be set to nothing is the above right>