Unbound combo and initial values in fields

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

Guest

I have an unbound combo box that is used to select an employee - it work fine
except when I open the form, the combo is blank, but the form's other fields
are filled in for the 1st row in the table. I would like either:
- to have the fields all blank until the combo box is used to select an
employee
- to have the name in the combo box set to the value of the 1st row when the
form opens.

I am using MS Access 2000.

Thanks, Lisa
 
Use the Current event procedure of the form to write the value to the combo,
e.g.:
Private Sub Form_Current()
Me.cboNav = Me.EmployeeID
End Sub

Alternatively, move the form to the new record when it first loads:
Private Sub Form_Load()
If Not Me.NewRecord Then
RunCommand acCmdRecordsGotoNew
End If
End Sub

Or, if you don't want to see the old records, just set its Data Entry
property to Yes.
 

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