Combo Box

G

Guest

I am using a form to update only, not add, records in a table called Post
Closing Deficiency Log. The LoanNum is the field I'm using in the combo box.
I am displaying the borrowers name and Deficiency1, 2, 3, 4, 5 because users
will possibly need to update the deficiencies. I want the form to default to
the Combo box in the header but it defaults to the detail. What can I do to
have to form open in the header combo box? Also, can I use a control button
to move the cursor to the combo box?
 
G

Guest

Ginger,
In the "On Load" event of your form properties choose the [Event Procedure]
and type in something like this in VBA code

Private Sub Form_Load()
Me.LoanNum.SetFocus
End Sub

but realize a user won't be able to "tab" into any of the fields in the
detail section, they'll have to use their mouse to get to another field.

HTH
 
G

Guest

Joe,
I am new to writing code and have been trying things with a lot of
frustration. I used the code below and got a compile error "Method or data
member not found".
Here is the code I used in the "On Load" event.

Private Sub Form_Load()
Me.LoanNum.SetFocus

End Sub

Thank you very much.



Joe said:
Ginger,
In the "On Load" event of your form properties choose the [Event Procedure]
and type in something like this in VBA code

Private Sub Form_Load()
Me.LoanNum.SetFocus
End Sub

but realize a user won't be able to "tab" into any of the fields in the
detail section, they'll have to use their mouse to get to another field.

HTH
--
Joe


GingerF said:
I am using a form to update only, not add, records in a table called Post
Closing Deficiency Log. The LoanNum is the field I'm using in the combo box.
I am displaying the borrowers name and Deficiency1, 2, 3, 4, 5 because users
will possibly need to update the deficiencies. I want the form to default to
the Combo box in the header but it defaults to the detail. What can I do to
have to form open in the header combo box? Also, can I use a control button
to move the cursor to the combo box?
 
G

Guest

Hi Ginger,
You will get that compile error and the code should break and highlight at
the offensive "data member not found". I would assume it highlights the
"LoanNum" portion of the line, if this is the case, the code needs to show
the actual name of the control where you want the control set, i.e. if your
control (textbox, listbox, button, whatever) is named "MyControl" then the
line should read: Me.MyControl.SetFocus.
Let me know if that helps,
--
Joe


GingerF said:
Joe,
I am new to writing code and have been trying things with a lot of
frustration. I used the code below and got a compile error "Method or data
member not found".
Here is the code I used in the "On Load" event.

Private Sub Form_Load()
Me.LoanNum.SetFocus

End Sub

Thank you very much.



Joe said:
Ginger,
In the "On Load" event of your form properties choose the [Event Procedure]
and type in something like this in VBA code

Private Sub Form_Load()
Me.LoanNum.SetFocus
End Sub

but realize a user won't be able to "tab" into any of the fields in the
detail section, they'll have to use their mouse to get to another field.

HTH
--
Joe


GingerF said:
I am using a form to update only, not add, records in a table called Post
Closing Deficiency Log. The LoanNum is the field I'm using in the combo box.
I am displaying the borrowers name and Deficiency1, 2, 3, 4, 5 because users
will possibly need to update the deficiencies. I want the form to default to
the Combo box in the header but it defaults to the detail. What can I do to
have to form open in the header combo box? Also, can I use a control button
to move the cursor to the combo box?
 
G

Guest

That works perfect! Thank you Joe.

Joe said:
Hi Ginger,
You will get that compile error and the code should break and highlight at
the offensive "data member not found". I would assume it highlights the
"LoanNum" portion of the line, if this is the case, the code needs to show
the actual name of the control where you want the control set, i.e. if your
control (textbox, listbox, button, whatever) is named "MyControl" then the
line should read: Me.MyControl.SetFocus.
Let me know if that helps,
--
Joe


GingerF said:
Joe,
I am new to writing code and have been trying things with a lot of
frustration. I used the code below and got a compile error "Method or data
member not found".
Here is the code I used in the "On Load" event.

Private Sub Form_Load()
Me.LoanNum.SetFocus

End Sub

Thank you very much.



Joe said:
Ginger,
In the "On Load" event of your form properties choose the [Event Procedure]
and type in something like this in VBA code

Private Sub Form_Load()
Me.LoanNum.SetFocus
End Sub

but realize a user won't be able to "tab" into any of the fields in the
detail section, they'll have to use their mouse to get to another field.

HTH
--
Joe


:

I am using a form to update only, not add, records in a table called Post
Closing Deficiency Log. The LoanNum is the field I'm using in the combo box.
I am displaying the borrowers name and Deficiency1, 2, 3, 4, 5 because users
will possibly need to update the deficiencies. I want the form to default to
the Combo box in the header but it defaults to the detail. What can I do to
have to form open in the header combo box? Also, can I use a control button
to move the cursor to the combo box?
 

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

Similar Threads


Top