Jeff Barrows
Jeff at OUTBAKTech.com
Wed Dec 22 10:42:37 CST 2004
This sounds like it might just do the trick! I will try it out tonight and let the list know how it works for me! Thanks again for the ideas!!! -----Original Message----- From: Kevin Bachmeier [mailto:kevinb at bepc.com] Sent: Wed 12/22/2004 8:08 AM To: Access Developers discussion and problem solving Cc: Subject: RE: [AccessD] Best way to requery a list box in Access 2003 Hi Jeff - I just so happened to tackle that same issue last night. I'm sure there are different ways of doing it, but here's what I did: My 'redirection' to the entry screen for the missing information is via a double click event of a combo box, so in the double click event, I am doing a docmd.openform and use the last parameter (openargs) of the docmd.openform command to insert "forms![formname]![controlname].requery" (the list box field on the form whose datasource you want to refresh). Then in the entry form's Close event, I stick: if not isnull(me.openargs) then eval(me.openargs) end if Since I may be calling this same entry screen from multiple screens, this will refresh the correct field's data source no matter where it was called from. Of course if you use the openargs for other functionality, this will not work for you. There are probably better ways of doing this, but so far it works for me. Good luck. Kevin -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Jeff Barrows Sent: Wednesday, December 22, 2004 7:50 AM To: AccessD Subject: [AccessD] Best way to requery a list box in Access 2003 I have a data entry form that uses dropdown lists to verify data exists. If the data does not exist, the user is redirected to the entry screen for the missing information. My problem occurs when the user closes the second entry screen. The list box on the first screen needs to be requeried, but I cannot seem to find the correct location to place the command. Any suggestions??? Jeff B -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com