By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,060 Members | 1,906 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,060 IT Pros & Developers. It's quick & easy.

Form opens and takes first values from table

P: n/a
Hi,

I have a subform that opens from a main form via a command button. The main form fields are populated based on a series of queries, ultimately based on tables. The subform is populated from and bound to a separate table.

On the main form, the fields are blank, however when opening the subform via the first record on the main form, the fields in the subform are populated with the first values on its dedicated table, albeit the ID (Primary Key) is the record it ought to be (as defined by the record on the main form). I would like it to remain blank if there is no data for that ID, rather than stealing the first available data from another record!

I've done numerous Google searches to figure out what's wrong but as yet have had no luck. Any help would therefore be greatly appreciated.

Thanks
Sarah
Oct 20 '10 #1
Share this Question
Share on Google+
2 Replies


dsatino
100+
P: 393
Are your parent/child attributes set correctly?
Oct 20 '10 #2

P: n/a
Thanks for the suggestion. I wasn't sure how to change the parent-child attributes, so some more Google searching was required. In the process, it got me to revisit and really look at the table/s involved, and I've now changed the Required property on the fields that aren't the Primary Key to 'Yes', which seems to have sorted it (in any case, I'm going through the various ways it screwed up before and I can't make it do it again, so hopefully that's solved it).
Cheers.
Oct 21 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.