Hi, I have a form, part of which is based on a temporary table which is populated using the following code
The temporary table is emptied when the form is closed.
When I navigate through the form I get to a blank record which I think is because the temporary table allows new records to be added to it. I don't want the user to get a blank record so is there any way to limit the records in the temporary table exactly to the records in the query?
Thank you for any help
Code:
Private Sub Form_Open(Cancel As Integer)
DoCmd.SetWarnings False 'switch off warning messages re adding & deleting records
DoCmd.RunSQL ("INSERT INTO tblTEMPIfCropping SELECT * FROM qryfrmIfCropping")
DoCmd.SetWarnings True 'reset warnings
Me.Requery
DoCmd.Maximize
End Sub
The temporary table is emptied when the form is closed.
When I navigate through the form I get to a blank record which I think is because the temporary table allows new records to be added to it. I don't want the user to get a blank record so is there any way to limit the records in the temporary table exactly to the records in the query?
Thank you for any help