View Full Version : Populating text boxes only after selecting value from a combo box


Romulus
03-04-2002, 11:01 AM
I have a form that allows the user to either select a person in the database based on their ID number or to add a new person to the database using a combo box.

When the form first opens, the form is automatically populated with values from the first record in the table.

What I want is for the form to be blank until the user selects a person on their ID number. I tried using the "open in add mode" using switchboard manager, but every time I select an existing ID, it asks if I want to add it. Then there are duplicate IDs!

David R
03-04-2002, 12:49 PM
Use this after DoCmd.OpenForm..., in the switchboard button:
DoCmd.GoToRecord , , acNewRec

Open in Add mode doesn't work for your purposes because that doesn't include existing records in the dataset. This will jump you to the 'new' record entry at the bottom of your record set.

HTH,
David R

Romulus
03-05-2002, 06:50 AM
This was just what I needed. Thanks!