bluerooster
09-29-2009, 05:58 PM
I have a table for clients (tblClients). Clients details are input into the table from a form (frmClients). Clients notes are to be filled in from the same form (frmClients) via a memo field (txtNotes) and stored into a different table (tblNotes).
I have a primary key field in tblClients (ClientsID) as well as using that as a foreign key in tblNotes.
I have created a query (tblNotesForClientsQuery) which displays results properly on its own. But I can't connect it to txtNotes on frmClients .
How do I get the proper notes to display for each client in frmClients?
And when a new note is input into txtNotes on frmClients, to update the table tblNotes with the correct note for each client?
Thanks in advance.
Mr. B
09-29-2009, 07:10 PM
Create a sub form and use your tblNotes table (or you might want to use a query based on the tblNotes table so you can spceify a sort order, assuming that you have a date and/or time field in the tblNotes table to sort on) as the record source for this sub form. Then put the sub form in your original frmClients form and link these two forms using the Master/child link option.
You may want your sub form to be a continous type form. so it will display all notes for any one client.
HiTechCoach
09-29-2009, 07:11 PM
I would use a sub form to display the notes. Setting the Master/Child linking fields properties of the sub form control will enable Access to handle it for you.
wiklendt
09-29-2009, 07:12 PM
do you have the txtNotes in a subform? (i.e., can any one client have more than one note?)
if you can see all the notes in a query, but not in the form, it could be that you only have one note per client on display, without being able to add a new note - a subform would help there.
is that what you mean?
otherwise, the only other thing i can think of to help you is to make sure your joins are correct, you will need an OUTER JOIN between your client and notes tables (i.e., double click on the join line between the two tables and select the option that allows you to view all records from clients and only those in notes that match.)
bluerooster
09-29-2009, 08:33 PM
I didn't have txtNotes in a subform, but will do that now and see how I go with it.
Many thanks to everyone for their assistance.
bluerooster
09-30-2009, 02:39 AM
Many thanks to you all, Mr B, Hi Tech Coach, Wiklendt. After installing some bits of Office that weren't installed and taking your advice and tips, I've got it displaying the notes properly. Haven't tried whether adding new notes will work properly yet. But you have all helped me overcome a problem that had me stumped. Please give yourselves a pat on the back for me :-)