MastercafeCTV
mastercafe at ctv.es
Wed Mar 26 22:02:21 CST 2003
normally we uses on this format, String in variables. See the sample Function ChangeValue(Result as Variant, FieldName as string, RecSet as string) as result dim db as database dim rs as recordset set db=rs.opendatabase(recset) rs.edit rs.fields(fieldname) = RESULT rs.update rs.close End Function -----Mensaje original----- De: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]En nombre de Selina Iddon Enviado el: jueves, 27 de marzo de 2003 03:07 Para: accessd at databaseadvisors.com Asunto: Re: [AccessD] Fieldnames in a Recordset Hi Everyone If someone could please help me here I'd be extremely grateful. I have a string which is a field name - ie str = "fieldname" Then I open a recordset and want to retrieve the value of that field from the recordset, but want to pass the name as the str, not use the rst!fieldname=. I'm doing this because I'm looping through 30 odd fields and don't want to have to type each one out, rather loop through the controls and get the names this way. Hope this makes sense. Cheers Selina _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com