Randall Anthony
ranthony at wrsystems.com
Wed Jul 16 13:58:28 CDT 2003
Thanks Doris, I'll check that out, right now I'm working on getting the case statements right, looks like this is the way to go. Thanks again!! -----Original Message----- From: Mike and Doris Manning [mailto:mikedorism at ntelos.net] Sent: Wednesday, July 16, 2003 2:50 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Parameter Loop If the field and number also need to change to then I would use the For...Next combined with a Select Case to handle each 1-9 step. Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Randall Anthony Sent: Wednesday, July 16, 2003 2:19 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Parameter Loop Thanks, Doris, at first glance that may get me on the right track, however, the field_Name and Number also have to change. I'll mull this over, maybe a case statement? -----Original Message----- From: Mike and Doris Manning [mailto:mikedorism at ntelos.net] Sent: Wednesday, July 16, 2003 1:48 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] Parameter Loop How about looping through to create the query name? Dim lcv as Integer Dim strName as string For lcv = 1 to 9 strName = "qry" & lcv & "_name" UpdateData strname, field_name, field_number Next lcv Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Randall Anthony Sent: Wednesday, July 16, 2003 1:42 PM To: accessd at databaseadvisors.com Subject: [AccessD] Parameter Loop Hi all, Looking for solution to setting up a loop to pass parameters and I think I've made it more complicated than it needs to be, anyhooo... I have a routine UpdateData, where I pass three parameters: UpdateData "qry1_name", field_Name, field_number Works great. However, I need to pass more than one query (I have nine). In other words, once the above is ran, I need to pass "qry2_name", etc to this function up to "qry9_name". Any thoughts are greatly appreciated. Randy @ ext. 473 _______________________________________________ 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 _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com