Pre-populate form on add new record?

S

SteveB

Hi all

I have an Access 2007 database for handling customer queries, to start each
query we enter name and address details and then carry on with the entering
rest of the query on the form. One record = 1 customer query.

What I need to do is where a customer has multiple queries, is to open a new
form but carry over the personal details from the previous entry. Ideally it
would be a command button that sits at the side of my exit button to give a
choice of quiting to menu or enter a new query for the same customer.

I have been pointed in the direction of OpenArgs but cannot see how that
would work.

Any help or guidance would be most appreciated.

Steve
 
T

tina

what you really have is a one-to-many relationship between customers and
queries: one customer may have many queries, but each query belongs to only
one customer. also, i'm guessing two things here: first, that you're
tracking each query in a single customer *contact* (phone call, or perhaps
email, fax, etc), and second, that you are NOT attempting to identify
multiple contacts from the same customer (customer calls Wednesday, then
calls again next week, then calls again next year).

based on the above, suggest two tables, as

tblCustomerContacts
ContactID (primary key)
ContactDate
CustomerFirstName
CustomerLastName
Address1
Address2
City
State
Zip
<other fields that store personal details about the customer>

tblContactQuestions
QuestionID (pk)
ContactID (foreign key from tblCustomerContacts)
<other fields that store data about the specific question>

(note that i replaced "query" with "question" only for clarity, since
"query" has a specific meaning in Access (and other) databases.)

you can base a main form on tblCustomerContacts, with a subform based on
tblContactQuestions. so each customer contact is one record, with as many
question records as needed *related* to a single contact record - with no
duplication of customer data. suggest you read up on relational design
principles; it'll help you to ensure that you optimize your
tables/relationships structure. for more information, see
http://home.att.net/~california.db/tips.html#aTip1

hth
 

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