look up a value for a table if it isn't there creat a new row

J

Jules

Hi,

I'm not used to Access at all. I have 2 tables - Customer and appt. I want
to be able to enter a Customer Number in a form and if the customer number
exists, show the customer info on the form and related appt details on the
subform. If I enter a customer ID that does not exist I want access to allow
me to create a new record of customer info. How do I do this?
 
J

Jeff Boyce

Jules

What type of control are you using on the form to enter the CustomerID? A
combobox? A textbox?

A combobox gives you a NotInList event you can use to add a new record.

By the way, most folks don't memorize "customerIDs". Customer names are
much easier to remember. Perhaps you want to reconsider forcing your users
to enter customerIDs?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

Jules

Hi

Thanks for your help. I have tried a combo box but don't really know how it
works. I'd imagined having a field to type the ID number (has to be used)
and if that customer existed, the other fields being populated with relevant
info. If not fields blank for filling in.

Am I really slow, I can't find anything in my 'dummies' book that makes
sense??
 

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