J
joann007
I WILL BUY YOU A BEER IF YOU CAN HELP ME WITH THIS!!!!!!!
Sorry about the long title-I wanted to make sure I got all the keywords
in there. Here's rundown of my troubles:
I'm a legislative researcher PA and I was asked to build a database
tracking all proposed bills and related documents. Mind you, I had not
ever used Access before three months ago...so be kind.
My database works spectacular until you get to one of my data entry
forms-frmDocuments. This form contains 3 tabs with subforms contained
in them, with other subforms in those, so it gets pretty confusing.
My search form (which works wonderfully, thank you Allen Browne) opens
up frmDocuments. frmDocuments is composed of three tabs:
tabGeneralInfo, tabAnalyst, and tabEvents.
On the main form of tabAnalyst is subform subfAnalystAttatched.
SubfAnalystAttatched (yes, I do know I spelled that wrong) has the
following text boxes: DocID (not enabled), Analyst, Date Assigned, and
Due Date. It also has three check boxes that show whether a fiscal
note, memo, or folder are needed. All of this information is coming
from the Master table and reflect the bill selected by the researcher
on the search form.
SubfAnalystAttatched also has two subforms: SubfDocAddNote and
subfDocNote (I've made sure these are the control names).
SubfDocNote is a continuous subform that lists all the notes associated
with that piece of legislation. SubfDocNote is getting it's data from
the Notes table. The Data Property is set to Link Child Fields:
DocumentID (from Notes table)
Link Master Fields: Documents_DocID (primary autonumber from Master
table)
I would like the researchers to be able to type notes in a text box on
subformDocAddNote, press a control that would save the new record to
the Notes table, and then refresh subfDocNotes to reflect the addition
of that note.
I've been trying to do this for two weeks now, and I'm desperate. I've
tried modules, refresh, requery, append queries, and everything else
under the sun. Unfortunately, I've had no luck. A save record and
then requery statement in SQL works fine for the first note, but when I
try to add a second note associated with the DocID, it overwrites the
first. Oh, what is a girl to do?!
So, if someone out there can help me do this, I will buy them a beer
next time you pass through Harrisburg PA. Please, I'm desperate!
Here's a summary of the info in the db, let me know if you need
anything else.
Tables
Master
-Documents_DocID (autonumber)
-lastname (text)
-DateAssigned (number)
-Date_Due (number)
-fiscal_note (Y/N)
-Memo (Y/N)
-Folder (Y/N)
Notes
-NoteID (autonumber, primary)
-Note (Memo)
-NoteDate (Date/Time)
-DocumentID (Number)
Main Form:
frmDocuments-contains 3 tab controls, nothing else
TabControl:
tabAnalyst (there are two other tabs, but I'm not concerned with
them...they work)
Subform on tabAnalyst:
subfAnalystAttatched
SubfAnalystAttatched:
txtDocuments_DocID (text box, not enabled)
txtlastname (text box)
txtDate_assigned (text box)
txtDate_Due (text box)
chkfiscal_note (check box)
chkMemo (check box)
chkFolder (check box)
***Control sources all set to related fields in Master table***
subfNewDocNote (subform, Linked Child Fields= DocID from Notes
table, Linked Parent Fields= Documents_DocID from Master table)
subfDocNote (subform, Linked Child Fields= DocID from Notes
table, Linked Parent Fields= Documents_DocID from Master table)
subfNewDocNote:
txtNoteDate (text box, control source= NoteDate from Notes table)
txtID (text box, text box, control source= Document ID from Notes
table, not enabled)
txtNoteID( textbox, not enabled, control source= NoteID from Notes
table)
txtNewComment (textbox, control source=Note from Notes table)
*When I make this text box unbound, it doesn't let me type
anything in it*
subfDocNote:
txtNoteDate (control source= NoteDate from Notes table)
txtDocument ID (control source= DocumentID from Notes table)
txtNote (control source = Note from Notes table)
***All are text boxes, visible, but not enabled***
I did try to put subfNewDocNote and subfDocNote all on the same
subform, but then it wouldn't let me type into text box to insert a new
note...go figure.
Please give me some advice, it would be greatly appreciated!
Sorry about the long title-I wanted to make sure I got all the keywords
in there. Here's rundown of my troubles:
I'm a legislative researcher PA and I was asked to build a database
tracking all proposed bills and related documents. Mind you, I had not
ever used Access before three months ago...so be kind.
My database works spectacular until you get to one of my data entry
forms-frmDocuments. This form contains 3 tabs with subforms contained
in them, with other subforms in those, so it gets pretty confusing.
My search form (which works wonderfully, thank you Allen Browne) opens
up frmDocuments. frmDocuments is composed of three tabs:
tabGeneralInfo, tabAnalyst, and tabEvents.
On the main form of tabAnalyst is subform subfAnalystAttatched.
SubfAnalystAttatched (yes, I do know I spelled that wrong) has the
following text boxes: DocID (not enabled), Analyst, Date Assigned, and
Due Date. It also has three check boxes that show whether a fiscal
note, memo, or folder are needed. All of this information is coming
from the Master table and reflect the bill selected by the researcher
on the search form.
SubfAnalystAttatched also has two subforms: SubfDocAddNote and
subfDocNote (I've made sure these are the control names).
SubfDocNote is a continuous subform that lists all the notes associated
with that piece of legislation. SubfDocNote is getting it's data from
the Notes table. The Data Property is set to Link Child Fields:
DocumentID (from Notes table)
Link Master Fields: Documents_DocID (primary autonumber from Master
table)
I would like the researchers to be able to type notes in a text box on
subformDocAddNote, press a control that would save the new record to
the Notes table, and then refresh subfDocNotes to reflect the addition
of that note.
I've been trying to do this for two weeks now, and I'm desperate. I've
tried modules, refresh, requery, append queries, and everything else
under the sun. Unfortunately, I've had no luck. A save record and
then requery statement in SQL works fine for the first note, but when I
try to add a second note associated with the DocID, it overwrites the
first. Oh, what is a girl to do?!
So, if someone out there can help me do this, I will buy them a beer
next time you pass through Harrisburg PA. Please, I'm desperate!
Here's a summary of the info in the db, let me know if you need
anything else.
Tables
Master
-Documents_DocID (autonumber)
-lastname (text)
-DateAssigned (number)
-Date_Due (number)
-fiscal_note (Y/N)
-Memo (Y/N)
-Folder (Y/N)
Notes
-NoteID (autonumber, primary)
-Note (Memo)
-NoteDate (Date/Time)
-DocumentID (Number)
Main Form:
frmDocuments-contains 3 tab controls, nothing else
TabControl:
tabAnalyst (there are two other tabs, but I'm not concerned with
them...they work)
Subform on tabAnalyst:
subfAnalystAttatched
SubfAnalystAttatched:
txtDocuments_DocID (text box, not enabled)
txtlastname (text box)
txtDate_assigned (text box)
txtDate_Due (text box)
chkfiscal_note (check box)
chkMemo (check box)
chkFolder (check box)
***Control sources all set to related fields in Master table***
subfNewDocNote (subform, Linked Child Fields= DocID from Notes
table, Linked Parent Fields= Documents_DocID from Master table)
subfDocNote (subform, Linked Child Fields= DocID from Notes
table, Linked Parent Fields= Documents_DocID from Master table)
subfNewDocNote:
txtNoteDate (text box, control source= NoteDate from Notes table)
txtID (text box, text box, control source= Document ID from Notes
table, not enabled)
txtNoteID( textbox, not enabled, control source= NoteID from Notes
table)
txtNewComment (textbox, control source=Note from Notes table)
*When I make this text box unbound, it doesn't let me type
anything in it*
subfDocNote:
txtNoteDate (control source= NoteDate from Notes table)
txtDocument ID (control source= DocumentID from Notes table)
txtNote (control source = Note from Notes table)
***All are text boxes, visible, but not enabled***
I did try to put subfNewDocNote and subfDocNote all on the same
subform, but then it wouldn't let me type into text box to insert a new
note...go figure.
Please give me some advice, it would be greatly appreciated!