get focus on a field in a form

D

david

Hi
I have created a form for entering kilometers on vehicles to enable exam
planning when I put the mileage in one field I have a formulae that works out
the average.
Now what I would like to do is put this in a comment field and then carry on
entering the data
Is there a way of setting the focus from one field to another enter the data
by the formulae and thecome back to the current field
 
M

mscertified

You dont have to move to the control to put something in there, just say:
Me!Comment = Me!Average
If for some reason you do need to move the focus, the syntax is
Me!Comment.setfocus

-Dorian
 
D

david

Thanks for the info
I have a problem inplementing as the field is actually called exam comments
therefore I presumed that I would have to us Me!Exam Comments --which gives
me a compile error expected = due to the space

Regards
David
 
F

fredg

Thanks for the info
I have a problem inplementing as the field is actually called exam comments
therefore I presumed that I would have to us Me!Exam Comments --which gives
me a compile error expected = due to the space

Regards
David

re: > Me!Exam Comments --which gives me a compile error expected =
due to the space

1) That's what brackets are for.
Me![Exam Comments].SetFocus

2 A good reason not to use spaces in a field name.
 
D

david

Thanks to all
Problem solved
--
Regards
David


fredg said:
Thanks for the info
I have a problem inplementing as the field is actually called exam comments
therefore I presumed that I would have to us Me!Exam Comments --which gives
me a compile error expected = due to the space

Regards
David

re: > Me!Exam Comments --which gives me a compile error expected =
due to the space

1) That's what brackets are for.
Me![Exam Comments].SetFocus

2 A good reason not to use spaces in a field name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top