UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> List Box Update After Adding/editing/"deleting" A Record    
 
   
home70
post Jan 8 2011, 10:47 PM
Post #1

UtterAccess Veteran
Posts: 321



I can't seem to get this list box to update itself when I add, or edit, or "delete" a record. (I wrote delete as "delete" because I'm not really deleting the records. I have a Delete button that writes the date into the record, and when that field has a value in it, the query doesn't return that record, so it's like the record is deleted, but it's recoverable if I wanted to.

Anyway, I can't get my list box to refresh itself when I do any of these three things. I'm using the me.listboxname.requery command. I've tried it in the Form's current, after update, and dirty events. Nothing happens. How can I do this? Thank you.
Go to the top of the page
 
+
Doug Steele
post Jan 9 2011, 10:27 AM
Post #2

UtterAccess VIP
Posts: 17,643
From: Don Mills, ON (Canada)



Using Requery in the AfterUpdate event should do it. You sure the code's actually firing (and that you're doing the requery on the correct control)?
Go to the top of the page
 
+
home70
post Jan 9 2011, 05:30 PM
Post #3

UtterAccess Veteran
Posts: 321



Got it, thanks a lot for your help and keeping me on track.

In each of the appropriate controls' after update events, I had to do this and it worked perfectly:
CODE
Form.Requery
Me.ListboxName.Requery


Thanks again.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 24th May 2013 - 12:00 PM