Query data not showing in Subform

Gregorys05

Board Regular
Joined
Sep 24, 2008
Messages
217
Hi,
I am trying to get a subform to show the results from a query, the code below loads the form sets the recordset which i know works as the subform lets you scroll through 4000 odd records

BUT

none of the records are actually displayed, :mad:
any ideas why this may be or how to fix it.

Thanks

Code:
Private Sub cmdviewinByboxnotindhl_Click()
DoCmd.OpenForm "Form1", acNormal, "", "", , acNormal
SQL = "SELECT TblBybox_Returns_CSV.Meter_Serial_Number" & _
" FROM TblBybox_Returns_CSV LEFT JOIN TblDHL_Returns_CSV ON TblBybox_Returns_CSV.Meter_Serial_Number = TblDHL_Returns_CSV.Mtr_Serial_Number" & _
" WHERE (((TblDHL_Returns_CSV.Mtr_Serial_Number) Is Null));"

Forms![Form1]![Form2].Form.RecordSource = SQL
Forms![Form1]![Form2].Form.Requery

End Sub
[code]
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Not sure if this helps but this is how my form ends up looking

-- removed inline image ---
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,737
Messages
6,132,436
Members
449,728
Latest member
teodora bocarski

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top