Hi all,
as per the title I've got a subform formatted as datasheet. On the main form I'm changing the recordsource of this subform:
Let's say this results in 10 columns being returned. Now I'm doing another query:
Now only 2 columns get returned and the other columns display #Name.
I understand that this is being caused by the fact that I added all these fields to my subform during design. But obviously I would like that fields that are not in my query are not in the datasheet.
Is there a simple solution?
Thanks in advance!
as per the title I've got a subform formatted as datasheet. On the main form I'm changing the recordsource of this subform:
Code:
subOverview.Form.Recordsource = "SELECT * FROM tblCustomers"
Let's say this results in 10 columns being returned. Now I'm doing another query:
Code:
subOverview.Form.Recordsource = "SELECT FirstName, LastName FROM tblCustomers"
Now only 2 columns get returned and the other columns display #Name.
I understand that this is being caused by the fact that I added all these fields to my subform during design. But obviously I would like that fields that are not in my query are not in the datasheet.
Is there a simple solution?
Thanks in advance!