Drew Wutka
DWUTKA at marlow.com
Thu Oct 23 16:13:32 CDT 2003
That's easy. Dim ctrl dim strTemp strTemp="SELECT " For each ctrl in Me.Controls if isnull(ctrl.ControlSource)=False and ctrl.ControlSource<>"" then strTemp=strTemp & ctrl.ControlSource & ", " end if Next strTemp=Left(strTemp,Len(strTemp)-2) Now, if you have unbound controls, that code might act up a bit, so you would need to nest the If then statement in another one that checks the types of controls (either ignore the controls that can't be bound, or specify those that can). Drew -----Original Message----- From: John Colby [mailto:jcolby at colbyconsulting.com] Sent: Thursday, October 23, 2003 3:49 PM To: Access Developers discussion and problem solving Subject: RE: [AccessD] list every field bound to a control I have a form that the user wanted hundreds of fields from half dozen tables displayed on tabs. I just used SELECT * during design because I didn't know what they would want and what they wouldn't. Now it is done and it's time to clean up, not pull more than I absolutely need etc. One tabbed form. John W. Colby www.colbyconsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Drew Wutka Sent: Thursday, October 23, 2003 3:15 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] list every field bound to a control Clarify. Is this for a particular report or form, or for every control on everything in an entire database? Drew -----Original Message----- From: John Colby [mailto:jcolby at colbyconsulting.com] Sent: Thursday, October 23, 2003 12:50 PM To: AccessD Subject: [AccessD] list every field bound to a control I need a utility to list every field bound to a control. Has anyone ever written such a thing? John W. Colby www.colbyconsulting.com _______________________________________________ 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 _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com