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

Two Forms Linked to the Same Table

P: n/a
I have tblEvents which includes a Memo field for "Notes". I have a main
form to display various data from tblEvents, including a small space to
display the Notes field.

I'm trying to create a separate form (frmNotes) that displays the Notes
in a much larger area and allows editing.

I have a command button and code that opens frmNotes, no problem there.

frmNotes has tblEvents as its RecordSource. It has a text box bound to
tblEvents.Notes. It also has an ID field bound to tblEvents.ID.

With frmNotes.RecordsetType = Dynaset I can't get any data to display,
at least most of the time. The form opens up with "[AutoNumber]" in the
ID field and blank notes.

Oddly, every once in a while the current records' information actually
does populate. I can't discern what is different when this works vs.
when it doesn't. One concern I learned the hard way is making sure the
main form and the frmNotes aren't trying to update tblEvents at the same
time... I hosed the table once (good thing I had a backup!).

I found that if I set frmNotes.RecordsetType = Snapshot I can reliably
populate frmNotes, however I can't edit anything, of course.

I'm obviously missing something here. Your suggestions are greatly welcomed!
--
Smartin
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,
Just a thought, why not consider using an unbound form and passing the
string to your notes form. Use the onclose event to send your edited
string back to the active record. Something like:

docmd.openform "frm_Notes"
forms!frm_Notes!txt_Notes = me.txt_Notes

'OnClose
forms!frm_Main!txt_Notes = me.txt_Notes

Alternatively, you could simply open the record to edit it...
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frm_Notes"
stLinkCriteria = "[Note_ID]=" & "'" & Me![Note_ID] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormEdit

I prefer the first method for the simple reason of having control over
how and when the data is updated. Hope this helps.

Nov 13 '05 #2

P: n/a
Anton wrote:
Hi,
Just a thought, why not consider using an unbound form and passing the
string to your notes form. Use the onclose event to send your edited
string back to the active record. Something like:


I like it... I like it a lot. Guess I was trying to make this way too
difficult. Thanks!

--
Smartin
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.