Opening TAB Order!

B

Bob

My form open with the TAB button in Form Footer instead of Form Header how
can I change it to Form Header?


Thanks in advance.........Bob Vance
 
D

Dirk Goldgar

Bob said:
My form open with the TAB button in Form Footer instead of Form
Header how can I change it to Form Header?


Thanks in advance.........Bob Vance

I'm not sure what you mean by "the TAB button". Could you explain in a
bit more detail, please?
 
D

Dirk Goldgar

Bob said:
The button that is first highlighted when you open a form..Thanks Bob

You mean a command button that you yourself created? Or some part of
the normal form superstructure? Please pardon these additional
questions, but your question puzzles me, because normally it's the
form's Detail section, not its Header or Footer section, that has the
focus when the form opens.

FWIW, you can put code in the form's Load event to set the focus to any
control you want; e.g.,

Private Sub Form_Load()

Me.cmdMyButton.SetFocus

End Sub
 
B

Bob

I have this already on load:
Private Sub Form_Load()
DoCmd.Maximize
On Error Resume Next
tbCompanyName.value = DLookup("CompanyName", "tblCompanyInfo")
End Sub
Its because I wanted the close button highlighted, for when i am checking
Invoices I can quickly close..Thanks Bob
 
B

Bob

The Command Button is cmdClose...Thanks

Bob said:
I have this already on load:
Private Sub Form_Load()
DoCmd.Maximize
On Error Resume Next
tbCompanyName.value = DLookup("CompanyName", "tblCompanyInfo")
End Sub
Its because I wanted the close button highlighted, for when i am checking
Invoices I can quickly close..Thanks Bob
 
D

Dirk Goldgar

Bob said:
I have this already on load:
Private Sub Form_Load()
DoCmd.Maximize
On Error Resume Next
tbCompanyName.value = DLookup("CompanyName", "tblCompanyInfo")
End Sub
Its because I wanted the close button highlighted, for when i am
checking Invoices I can quickly close..Thanks Bob

So just add a line to that event procedure to set the focus to your
close button. If your close button were named "cmdClose", your code
might look like this:

Private Sub Form_Load()

DoCmd.Maximize

On Error Resume Next
tbCompanyName.value = _
DLookup("CompanyName", "tblCompanyInfo")

Me.cmdClose.SetFocus

End Sub
 
B

Bob

Dirk it is not working but I think because there is a big code on Event
Open...Thanks Anyway
 
D

Dirk Goldgar

Bob said:
Dirk it is not working but I think because there is a big code on
Event Open...Thanks Anyway

The Open event shouldn't normally make a difference, because it fires
before the Load event. Do you also have code in the form's Current
event? That might be mucking things up.

Don't give up so easily. Why not post the code you have in the form's
Open, Load, and Current events -- and the Activate event, if you have
any code there -- and let's see if we can figure out what's going on?
 

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