I'm trying to update a subform using record source. As you can see when I state:
Forms![main]![sub].Form.RecordSource = "Select * from [query]"
this only results in my subform having one record whereas the actual query has 507 records. Please could you tell me how to assign the data in the query to the subform,
I've been trying to sort this out for hours. Any thoughts very much appreciated,
Mike
Dim dbs As Database
Set dbs = CurrentDb
Dim rst As Recordset
Forms![main]![sub].Form.RecordSource = "Select * from [query]"
Me.Requery
Me.Refresh
Set rst = dbs.OpenRecordset("Select * from [query]")
Debug.Print rst.RecordCount & " Query Records" //outputs 507 records
Set rst = Forms![a_f_contacts]![k_f_list].Form.RecordsetClone
Debug.Print rst.RecordCount & " Records" //outputs 1 record
Forms![main]![sub].Form.RecordSource = "Select * from [query]"
this only results in my subform having one record whereas the actual query has 507 records. Please could you tell me how to assign the data in the query to the subform,
I've been trying to sort this out for hours. Any thoughts very much appreciated,
Mike
Dim dbs As Database
Set dbs = CurrentDb
Dim rst As Recordset
Forms![main]![sub].Form.RecordSource = "Select * from [query]"
Me.Requery
Me.Refresh
Set rst = dbs.OpenRecordset("Select * from [query]")
Debug.Print rst.RecordCount & " Query Records" //outputs 507 records
Set rst = Forms![a_f_contacts]![k_f_list].Form.RecordsetClone
Debug.Print rst.RecordCount & " Records" //outputs 1 record