Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2007

Tip: Looking for answers? Try searching our database.

Disappearing data in sync'd forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
prototype - 25 May 2007 20:01 GMT
I have a small sized text box in a form called frmMain. This text box may or
may not contain a large amount of text. If the text box does contain alot of
text I want to open up a new form called frmLargeText that contains a larger
text box to allow the user to easily see and edit the large amount of text. I
also need the two forms to stay in sync. i.e. if the user moves to a new
record then both forms move to the same record. I thought I could do this by
setting the recordset of frmLargeText to   equal the recordset of frmMain as
follows:

Dim frm as Form_frmLargeText
Dim rst As DAO.Recordset
Set rst = Me.Recordset
Set frm = New Form_frmLargeText
Set frm.Recordset = rst
frm.Visible = True

This all works fine untill the user edits the data in frmLargeText. Here's
what happens.
1) User edits text box in frmLargText
2) User switches back to frmMain and edits a diferent field but as soon as
the user types something this field the original text in the field disappears.

Both forms are set to Record Locks = Edited Records.

Why is the original text disapering? Is there a way to prevent the original
text from disappearing?

Thanks,
John W. Vinson - 26 May 2007 02:45 GMT
>I have a small sized text box in a form called frmMain. This text box may or
>may not contain a large amount of text. If the text box does contain alot of
>text I want to open up a new form called frmLargeText that contains a larger
>text box to allow the user to easily see and edit the large amount of text.

An alternative approach is to train the user to hit Shift-F2 to open the built
in Zoom box.

>I also need the two forms to stay in sync. i.e. if the user moves to a new
>record then both forms move to the same record. I thought I could do this by
[quoted text clipped - 13 lines]
>2) User switches back to frmMain and edits a diferent field but as soon as
>the user types something this field the original text in the field disappears.

>Both forms are set to Record Locks = Edited Records.
>
>Why is the original text disapering? Is there a way to prevent the original
>text from disappearing?

You now have two completely independent and unrelated recordset objects, one
for each form.

            John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.