Combo opening in a blank record

G

Glynn

I use a Combo box to select a record for update in a Form.

When I open the Form, the first record from the Combo box selection appears
on my Form.
I do not however want any record to appear until I select one from the
drop-down list provided by the Combo box. I want the Form to remain blank
until a record is selected.

Help
 
R

Ryan

One of two things might be happening. Either you are opening the form to a
record that already exists(most likely), or there is a default value set up
in the combo box. If the first is true, the solution is to open the form in
add mode. The way to do this to open the form, go to design view, in the top
left corner of the form there will be a little square, right click that, go
to properties, and then to the event tab. Go to the On Click event and click
the ... on the far right side. Add This code.

Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
End Sub

This will take you to a new record and all fields should be blank. In the
second case you would just need to remove the default value of 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

Top