Reffering to Control when Name is stored in Variable 
Author Message
 Reffering to Control when Name is stored in Variable



Quote:
> I have two variables stored in Access Basic, one called FormName the
> other FieldName. I need to set the value of the field FieldName in code.
> How do i refernce the field. I Have tried Forms!FormName!FieldName =
> NewValue but have had no luck.

Try

Forms(FormName).controls(FieldName).value

--
(remove a 9 to reply by email)



Mon, 09 Feb 2004 10:22:09 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Setting a control who's name is stored in a variable

2. accessing control name stored in a variable

3. Referencing a variable name stored in a variable

4. Reffering to controls of a continuous form

5. Repost: Reffering to controls in a subform/subreport

6. Variables stored in Range Names

7. Store the active worksheet(name) into variable

8. Storing subform name in variable when clicked

9. Temp QueryDef or Stored QueryDef Variable Name

10. Call Function using Func Name stored in variable


 
Powered by phpBB® Forum Software © phpBB Group