View Full Version : Question Do you have to SetFocus again and again


lynxbci
09-05-2008, 07:02 AM
Hi,
I am writing code to save 57 fields to a recordset from a form.

Currently i am doing :-
product_code.setfocus
!productcode=product_code.text
Name.setfocus
!name=name.text
etc etc

Do i have to set focus in thsi way for every field?

ALSO if the !productcode was !product code (with a space) what is the correct syntax for that as !product code = product_code.text creates an error, and !product_code=Product_code.text doesn't work either

Thanks

boblarson
09-05-2008, 07:24 AM
Don't use .Text as it requires the control to have focus.
Just use !productcode=Me!product_code

lynxbci
09-05-2008, 07:28 AM
So simple but so helpful, thanks very much