want to set focus in find

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a command button for find record. I want to get the find button to set
focus on the form to invoice number only, any ideas on the syntax for code in
VBA? Cheers!
 
Something like this?
Me.[Invoice Number].SetFocus
before your Find code.
 
Thanks MacDermott totally sorted it! i had the coding right just didnt use
the square brackets!
thanks again
Matt

MacDermott said:
Something like this?
Me.[Invoice Number].SetFocus
before your Find code.


Matt said:
I have a command button for find record. I want to get the find button to set
focus on the form to invoice number only, any ideas on the syntax for code in
VBA? Cheers!
 
Point to note in your naming convention the use of spaces can make things
more difficult for you in future use the _ instead of space then you don't
need the [ ]

e.g. Invoice_Number

there are systems out there that cannot read the space properly.



--
Regards

Alex White MCDBA MCSE
http://www.intralan.co.uk

Matt said:
Thanks MacDermott totally sorted it! i had the coding right just didnt use
the square brackets!
thanks again
Matt

MacDermott said:
Something like this?
Me.[Invoice Number].SetFocus
before your Find code.


Matt said:
I have a command button for find record. I want to get the find button
to set
focus on the form to invoice number only, any ideas on the syntax for
code in
VBA? Cheers!
 
Thanks Alex but that was his example i dont use spaces and had it set to
InvoiceNo thanks for the tip anyway!
Matt

Alex White MCDBA MCSE said:
Point to note in your naming convention the use of spaces can make things
more difficult for you in future use the _ instead of space then you don't
need the [ ]

e.g. Invoice_Number

there are systems out there that cannot read the space properly.



--
Regards

Alex White MCDBA MCSE
http://www.intralan.co.uk

Matt said:
Thanks MacDermott totally sorted it! i had the coding right just didnt use
the square brackets!
thanks again
Matt

MacDermott said:
Something like this?
Me.[Invoice Number].SetFocus
before your Find code.


I have a command button for find record. I want to get the find button
to
set
focus on the form to invoice number only, any ideas on the syntax for
code
in
VBA? Cheers!
 

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

Back
Top