I thought I should send the whole sub procedure for help.
Once this process is completed, it returns to the
form. The new record does not display unless I close the
form and repopen it or go to the bottom rec and return back to this current rec. I tried me.requery, me.refresh and nothing!!#@$#@!. Please help me with a solution. Your help will make my month!
Steve
If MsgBox("Are you sure you want to copy this item?", vbYesNo, "Question" = vbYes Then
Set rsCodes1 = New ADODB.Recordset
Set rsCodes2 = New ADODB.Recordset
mCode = Me.CODE.VALUE
mdesc = Me.DESC.VALUE
mrecsource = Me.RecordSource
DoCmd.SetWarnings False
' Make-table SQL statement
rsCodes1.Open "SELECT * INTO temp FROM arbcodes WHERE arbcodes.code = '" & _
mCode & "' and arbcodes.desc = '" & mdesc & "';", etc...
' Now append this record into arbcodes table and refresh
rsCodes2.Open "INSERT INTO ARBCODES SELECT temp.* FROM temp;", etc...
Me.Requery
DoCmd.SetWarnings True
adoConnection.Execute "DROP TABLE temp"
Me.RecordSource = mrecsource
End If
Once this process is completed, it returns to the
form. The new record does not display unless I close the
form and repopen it or go to the bottom rec and return back to this current rec. I tried me.requery, me.refresh and nothing!!#@$#@!. Please help me with a solution. Your help will make my month!
Steve
If MsgBox("Are you sure you want to copy this item?", vbYesNo, "Question" = vbYes Then
Set rsCodes1 = New ADODB.Recordset
Set rsCodes2 = New ADODB.Recordset
mCode = Me.CODE.VALUE
mdesc = Me.DESC.VALUE
mrecsource = Me.RecordSource
DoCmd.SetWarnings False
' Make-table SQL statement
rsCodes1.Open "SELECT * INTO temp FROM arbcodes WHERE arbcodes.code = '" & _
mCode & "' and arbcodes.desc = '" & mdesc & "';", etc...
' Now append this record into arbcodes table and refresh
rsCodes2.Open "INSERT INTO ARBCODES SELECT temp.* FROM temp;", etc...
Me.Requery
DoCmd.SetWarnings True
adoConnection.Execute "DROP TABLE temp"
Me.RecordSource = mrecsource
End If