C
cinnie
hi gurus
I have two unbound comboboxes with fixed lists that I use to create matching
entries in a table when I click on an 'Add New' button. I'm new at this
access game, so I suspect my code for the 'Add New' button is not well
written:
Private Sub AddNew_Click()
DoCmd.GoToRecord , , acNewRec
txtClientName.SetFocus
Me.txtClientName = Me.cboClientName
txtMenuName.SetFocus
Me.txtMenuName = Me.cboMenuName
cboClientName.SetFocus
Me.Requery
End Sub
a) I have to keep changing focus to get the values to enter into the query.
How is this normally done?
b) When the form first opens, the comboboxes appear blank. How can I go
back to this state after clicking?
I have two unbound comboboxes with fixed lists that I use to create matching
entries in a table when I click on an 'Add New' button. I'm new at this
access game, so I suspect my code for the 'Add New' button is not well
written:
Private Sub AddNew_Click()
DoCmd.GoToRecord , , acNewRec
txtClientName.SetFocus
Me.txtClientName = Me.cboClientName
txtMenuName.SetFocus
Me.txtMenuName = Me.cboMenuName
cboClientName.SetFocus
Me.Requery
End Sub
a) I have to keep changing focus to get the values to enter into the query.
How is this normally done?
b) When the form first opens, the comboboxes appear blank. How can I go
back to this state after clicking?