Hi I am using some temporary tables to help with the speed of one of my more complicated forms and have run into a problem.
When the form opens I run the following code.
On the form I have an unbound list box with its rowsource
If I open the temporary table whilst the form is open then it has the data in it but when the form opens the list box is blank. Any suggestions as to what might be wrong?
When the form opens I run the following code.
Code:
Private Sub Form_Open(Cancel As Integer)
DoCmd.SetWarnings False 'switch off warning messages re adding & deleting records
DoCmd.RunSQL ("INSERT INTO tblTEMPIfFertAppln SELECT * FROM qryfrmIfFertApplnP1 ORDER BY [FieldName] DESC")
DoCmd.RunSQL ("INSERT INTO tblTEMPfrmIFFertOM SELECT * FROM qryfrmIFFertOMP4")
DoCmd.RunSQL ("INSERT INTO tblTEMPFieldList SELECT * FROM qryfrmFertManureFieldList")
DoCmd.SetWarnings True 'reset warnings
Me.Requery
DoCmd.Maximize
End Sub
On the form I have an unbound list box with its rowsource
Code:
SELECT tblTEMPFieldList.FieldName, tblTEMPFieldList.FieldName2 FROM tblTEMPFieldList ORDER BY tblTEMPFieldList.FieldName;
If I open the temporary table whilst the form is open then it has the data in it but when the form opens the list box is blank. Any suggestions as to what might be wrong?