C
CliffordZivi
I want to access a field in recordset MyRS but the field
changes. As a result, I want to assign a value to a
string variable called "GenericFieldName" and use it's
VALUE to determine which field in the recordset to
access. Something like:
Dim GenericFieldName as String
Forms!frmMail!KeyName = MyRS![GenericFieldName]
So, if the VALUE of GenericFieldName = 'AccountNo' then I
want: Forms!frmMail!CurrentLocationNo = MyRS![AccountNo]
But if the VALUE of GenericFieldName = 'OrderNo' then I
want: Forms!frmMail!CurrentLocationNo = MyRS![OrderNo]
How can this be accomplished?
changes. As a result, I want to assign a value to a
string variable called "GenericFieldName" and use it's
VALUE to determine which field in the recordset to
access. Something like:
Dim GenericFieldName as String
Forms!frmMail!KeyName = MyRS![GenericFieldName]
So, if the VALUE of GenericFieldName = 'AccountNo' then I
want: Forms!frmMail!CurrentLocationNo = MyRS![AccountNo]
But if the VALUE of GenericFieldName = 'OrderNo' then I
want: Forms!frmMail!CurrentLocationNo = MyRS![OrderNo]
How can this be accomplished?