Is there a way?

D

deepak

Hi!
Sppose I make two tables tblName and tblAge. tblName has two fields name
and address. And tblAge has two fields age and telephone no. I want to know
if there is a way where I can desing a form where there are four text boxes
for name, address, age and telephone no, and a button (cmdStore) wiht caption
"STORE" and When I clik on the button STORE after feeding values on those
four textboxes, the value will get stored in tables tblName and tblAge.
Please let me know.
Thanking you all
 
B

BruceM

Asked and responded to in the forms group. Please do not multi-post.
Address one message to several groups (cross-post) if you must, but avoid
multi-posting, which wastes everybody's time.
 
P

Palacios

There is a way. However, based on your description, first, you should
normalize your tables and setup relationships between the two. Second, it is
better to calculate age based on "date of birth" than to input the age every
time it changes. That goes for all types of data manipulation in tables. Do
store the results, store the base data and calculate the results using code.
For instance, I need to know the month interval between today and some date
in the pass. I only store the date in the pass as part of my record and
calculate the difference using the function DateDiff("m", Date01, Date02).

Hope this helps.
 
J

Jeff Boyce

Something seems a bit off, based on your description.

How would the rows in the tblAge "know" which person they belong to?

And you probably don't really want to store "Age", since you'd need to
revisit that table EVERY DAY to update it and make it current. Instead,
store DateOfBirth, and use a query to calculate Age.

Why two tables? If the "Age" and telephone number belong to a person, why
not use one table and include those fields?

Also, when you build a form based on a single table, adding (or editing)
records is as easy as entering the values. No need for a <STORE> button ...
the data goes through the form and into the table!

Good luck!

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 
M

mscertified

All interfaces to these forums do not allow cross-posting. The interface I
use does not - so multi-posting is the only way to post to multiple forums.
It's discouraged but not prohibited in the forum guidelines.
 
D

Dirk Goldgar

mscertified said:
All interfaces to these forums do not allow cross-posting. The interface I
use does not - so multi-posting is the only way to post to multiple
forums.
It's discouraged but not prohibited in the forum guidelines.


Out of curiosity, what do you use? And, as it happens, the interface that
deepak is using does support cross-posting, so deepak should use it if it's
truly necessary to solicit answers from multiple groups.
 

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