Empty Text Boxes In A Form

J

Jeremy Storm

I would like to make a form so that when it opens, all
boxes are empty. They only fill when you type in a name
and push enter. I also have a form with names of other
emplyees and thier cell phone numbers...this form does
what I want. When you open it, all are emtpy. When you
start to type in a name, it auto fills, when you push
enter, the cell number fills in. (I took John's advise
and used last names as well...thank you). I have no idea
how I made one form do it, and another I cant. Any
ideas?

If this is not possible, I would at least like to have
all the text boxes filled with the first record.
Thank you, Jeremy
 
P

Pavel Romashkin

You can do either. The latter is simple - just bind the form to the data
table (or query).
For all of the boxes to be empty, make the form unbound, meaning there
is nothing in the forms RecordSource property in the Design view (you
can bind the form to the table, create all the fields and then remove
the record source).
Then, in the AfterUpdate event for your UNBOUND lookup combo box that
has its RowSource set to the lookup values (a query), put

Me.Form.RecordSource = "SELECT * FROM MyTable WHERE LookupField = '" &
Me.ComboLookup & "'"
Me.Requery

Cheers,
Pavel
 

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