want to set focus in find

M

Matt

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!
 
M

Matt

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!
 
A

Alex White MCDBA MCSE

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!
 
M

Matt

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!
 
Top