Jumat, 18 Desember 2015

RE: [MS_AccessPros] Re: Form not updating after underlying data changed

 

So I'm wondering how this will all work itself out.  I can see where he might be not on the first record, but the me.requery might take him back to the first record.

 

For subforms when I've wanted to stay on the same main record, I have done a me.subform.form.requery and that has been successful.

 

But…  without having it navigate away from the form?  How can he get the same requery effect?

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Friday, December 18, 2015 9:56 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Re: Form not updating after underlying data changed

 



Adam - try Me.Requery instead of Me.Refresh.

 

Regards,

Bill Mosca, Founder - MS_Access_Professionals

Microsoft Office Access MVP

My nothing-to-do-with-Access blog

 



---In MS_Access_Professionals@yahoogroups.com, <runuphillracing@yahoo.com> wrote :

Yes. See original message.



---In MS_Access_Professionals@yahoogroups.com, <sigurd@...> wrote :

Have you tried adding
   Me.Refresh

Sigurd Andersen

On 12/14/2015 3:32 PM, runuphillracing@... [MS_Access_Professionals] wrote:

 

I have a form based on a non-udateable query. To change data in a field, I click on the field, it makes visible an unbound combo box, assigns the underlying value to that combo box (Me.cmbSID = Me.SID), and shifts focus to that box. AfterUpdate changes the value in the underlying table:

stSQL = "UPDATE tblParentList SET tblParentList.SID = '" & Me.cmbSID & _
    "' WHERE tblParentList.ParentID = " & Me.ParentID
Db.Execute stSQL, dbFailOnError

 

Me.Refresh

The update happens in the underlying table. However, that change isn't reflected on the form.

 

What am I missing?

 

Adam

 

 






This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

__._,_.___

Posted by: Liz Ravenwood <Liz_Ravenwood@beaerospace.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (5)

.

__,_._,___

Tidak ada komentar:

Posting Komentar