AutoPopulate "TextBox" Fields

G

Guest

On this form I have customer info fields, ie., FirstName, LastName, Address,
PhoneNumber, etc. "IF" this information is already stored in the
"CustomerInfo" table, I would like to be able to have this information
miraculacly appear in coresponding fields of a new record "If" the first, or
first and second fields match existing data.

Please help !

Rick
 
J

John W. Vinson

On this form I have customer info fields, ie., FirstName, LastName, Address,
PhoneNumber, etc. "IF" this information is already stored in the
"CustomerInfo" table, I would like to be able to have this information
miraculacly appear in coresponding fields of a new record "If" the first, or
first and second fields match existing data.

I'd reconsider.

Are you assuming that you will NEVER have two customers who happen to
have the same name? I know three guys named Fred Brown.

I'd have a CustomerID field (perhaps an autonumber), and use a Combo
Box to select the customer. You certainly should NOT store the
firstname, lastname, etc. again and again - store it once and once
only, and then just navigate to that customer's record.

John W. Vinson [MVP]
 
G

Guest

John, Replicate names are few and far between. Although they do happen and
can be dealt with at the proper time. I'm simply looking for a simple way to
automatically fill-in the CustomerInfo data for repeat customers.

The form I use does not have combo boxes for names and addresses, only text
boxes.

If you know of a way to " Fill in the blanks ", I'd appriciate the share.

Rick
 
J

John W. Vinson

The form I use does not have combo boxes for names and addresses, only text
boxes.

If you know of a way to " Fill in the blanks ", I'd appriciate the share.

Ummmm...

The methods that come to mind both use combo boxes. If you're averse
to doing so, I could probably come up with some VBA code to do so...
but I'm leery of facilitating what I consider a probably-flawed table
design.

What's the context? Do you HAVE a Customer table? If not, what is the
structure of your tables, key fields, how they're related?

John W. Vinson [MVP]
 
G

Guest

The table structure is fairly simple. Customer information is contained in a
table called "CustomerInfo". However, restructuring is possible if it will
make a difference. For instance, Names can be stored in one table and
ContactInfo can be stored in a seperate table linked by an ID number.
Although I'm not sure what this would accomplish.

As far as the VBA code necessary to automatically retrieve repeat customer
contact information, I simply don't know what's needed to acomplish this.

Rick
 
J

John W. Vinson

The table structure is fairly simple. Customer information is contained in a
table called "CustomerInfo". However, restructuring is possible if it will
make a difference. For instance, Names can be stored in one table and
ContactInfo can be stored in a seperate table linked by an ID number.
Although I'm not sure what this would accomplish.

Please reread the above paragraph after clearing your mind of all your
current knowldge of your database - put yourself in my shoes (or, to
be more accurate, my new LL Bean wool slippers).

What have you told me about the structure of your database? Not much.
As far as the VBA code necessary to automatically retrieve repeat customer
contact information, I simply don't know what's needed to acomplish this.

If you reject the very basic tools that Access provides to do this -
combo boxes - you are making your job MUCH HARDER. If you really want
to do this the hardest possible way, I'd be (reluctantly) willing to
help, but I'd really suggest that you use the very straightforward
Combo Box Wizard to put a combo box on your form. Choose the option
"Use this combo to find a record."

John W. Vinson [MVP]
 
G

Guest

Rick, use the combo box wizard to find particular record info to display on
the form. eg: CustomerName or CustomerPhoneNumber. I use this technique in my
Customer Service db with 5 combos. Name, Phone, Fax, Cell, Companyname. Works
a treat!
 

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