Requery code is "firing" but not requerying?!

Dugantrain

I Love Pants
Local time
Yesterday, 19:41
Joined
Mar 28, 2002
Messages
221
Hi, all. Following is partial code in the On-Click event of a command button which calls a dialog box, has the user select a .xls file, pulls a certain worksheet in from that file to a Temp Table in the db, calls a function utilizing ADO which executes several different actions on the Temp data and then Requeries the subform that this now Permanent data should show up in:
Code:
Else: Me!txtFileName = LaunchCD(Me) 'Dialog box
    If Me!txtFileName = "" Then
    Exit Sub 'No file selected, so Exit
    Else
        DoCmd.TransferSpreadsheet acImport, , "tbl_temp_tools_import", Me.txtFileName, _
            False, "Install Tools!A7:O23"
        Call f_After_Import 'ADO function
 
'The Requery which isn't executing quite right
Forms!frmtoolkitsite!SubfrmToolkitSiteParts.Requery
End If
Exit Sub
Stepping through the code, the Requery is firing, but the records still do not show up in the Subform. If I move to a different record on the form and then move back, then the records are there, but, obviously, I'd like for the subform to correctly Requery as soon as the ADO function is completed.
 
If this is a Table-type recordset, it is not RESTARTABLE ie it cannot be requeried. Have you tried using Refresh instead?
 
Yes, I've tried Refresh, but I get an error. It seems that subform datasheets don't like "Refresh".
 

Users who are viewing this thread

Back
Top Bottom