How to do this?

P

pakerly

I want to create a simple form that updates a table, but also grabs
info for the form and for the new table from another table if info is
available:

Here is what I want to do:
I want to create a form that will add a record to a table,
(tblproductusers).
the form will look like this:
ACCT NUM:________
NAME
ADDRESS
CITY
STATE
ZIP
PRODUCT_______
PRICE________

the only things the user will enter on the form is, acct num, product
and price

the other name and address fields will be populated from a table
(tblaccounts) after the user enters an account number and presses tab,
if the account exists in that table

If it does not exist they can enter it.

there would be an ADD button and all those fields would be added to
the new tblproductusers table

any ideas?
 
M

Marshall Barton

I want to create a simple form that updates a table, but also grabs
info for the form and for the new table from another table if info is
available:

Here is what I want to do:
I want to create a form that will add a record to a table,
(tblproductusers).
the form will look like this:
ACCT NUM:________
NAME
ADDRESS
CITY
STATE
ZIP
PRODUCT_______
PRICE________

the only things the user will enter on the form is, acct num, product
and price

the other name and address fields will be populated from a table
(tblaccounts) after the user enters an account number and presses tab,
if the account exists in that table

If it does not exist they can enter it.

there would be an ADD button and all those fields would be added to
the new tblproductusers table


I think this would be easy if you used a subform for the
accout info. The LinkMaster/Child properties would take
care of displaying the data.
 
P

pakerly

Would using a subform allow me to only display the address info and
not the whole record from the other table? And if it was not there,
would it let me add it but then only put the info on this form into
the new table and not my account table?

I'm not to clear on subforms, but my understanding is that it is a
form within a form and displays things, for example a table, on
another form....
 
J

John W. Vinson

Would using a subform allow me to only display the address info and
not the whole record from the other table?
Yes.

And if it was not there,
would it let me add it but then only put the info on this form into
the new table and not my account table?
Yes.

I'm not to clear on subforms, but my understanding is that it is a
form within a form and displays things, for example a table, on
another form....

View, edit, add, whatever is needed.

You might want to look at the Orders form in the Northwind sample database, or
some of the tutorials at:

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

A free tutorial written by Crystal (MS Access MVP):
http://allenbrowne.com/casu-22.html

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials
 

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