1
votes

I'm building a form in access that has a several sub-forms in a tab control The sub-forms are working fine, but when I set the parent form's Record Source property and bind a few Text Boxes to the data, I find that a null recordset has been returned.

I've tried this with several different queries (each of which works in a separate query designer) to no avail. I've also tried binding the form to a Table directly and a null recordset is still returned.

I've checked the filters and they are turned off.

4

4 Answers

1
votes

If the Text Boxes that are bound to data are Locked and Disabled then the query will return a null dataset by default.

The form's 'Data Entry' property also needs to be set to false. Setting it to true will make the form for data entry only. This prevents any data that might be returned by the background dataset from appearing when the form loads.

0
votes

Have you tried executing a Requery on your parent form:

Me.RecordSource = "someQuery"
Me.Requery

?

0
votes

Can you unlock and/or enable the fields before setting the data source?

0
votes

Try checking the relationships in your tables especially if you used the auto "look-up" option to create a relationship. Open your tables in design view and check if your foreign keys(FK) are indexed appropriately or not (under field properties). If they are indexed, ensure you have the correct type of index for that particular field. Example; TABLE A with following columns PatientID(PK), PatientName and TABLE B with columns ID, PatientHeight, PatientWeight, PatientBP, PatientID(FK) For such Table B, if you have the "PatientID(FK) indexed with "duplication OK", you will get RecordSet error when using those fields related to this table in the form especially if the form JOINS fields from multiple tables. In summary, try checking the indexing of your fields especially if they correspond to their type of relationship