How to make a tabular form refresh???

S

SAG

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 me.repaint and still nothing!!#@$#@!. Please help me
with a solution. Your help will make my month! MS
Access's menu duplicate function just adds a blank
record???

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top