Form help

G

Guest

I have a table that has ID field which is (autonumber); Procedure-Number,
which is a lookup field from Procedure_list table; and Procedure-Name which
is also a lookup from Procedure_list table. What I want to do is have a form
that once the procedure number is selected then the procedure name is
automatically pops in to the field for it. How can I do that? Can anyone
help me on this task?

Thank you,
Judy
 
J

John W. Vinson

I have a table that has ID field which is (autonumber); Procedure-Number,
which is a lookup field from Procedure_list table; and Procedure-Name which
is also a lookup from Procedure_list table. What I want to do is have a form
that once the procedure number is selected then the procedure name is
automatically pops in to the field for it. How can I do that? Can anyone
help me on this task?

Thank you,
Judy

Take a look at

http://www.mvps.org/access/lookupfields.htm

for a critique of the Lookup Field misfeature.

You can put a Combo Box on your form (with or without using a lookup field in
the table!!!) which stores the procedure number while displaying the procedure
name. As a rule, it's best to keep Autonumber values (and their Long Integer
foreign key links) "under the hood" and not display them to users, at all. Why
do you feel that you need to see both?

If you're trying to store both the procedure number and the procedure name in
a second table - *don't*. It's redundant. Just use the procedure number and
look it up (using a Combo Box or a query joining the two tables) when you need
to see the name.

John W. Vinson [MVP]
 
G

Guest

John,
Thank you for your help, it really helped to understand that i did not want
to store the procedure name again, and that I wanted to do a query to pull
the two together. Okay, another issue. This will be like a survey form
with option box 1-4 1 being have knowledge and 4 being needs help with this
task. How do I want ot store this type of data? Can you help with that?
Thanks again for the help.
JudyT
 
J

John W. Vinson

John,
Thank you for your help, it really helped to understand that i did not want
to store the procedure name again, and that I wanted to do a query to pull
the two together. Okay, another issue. This will be like a survey form
with option box 1-4 1 being have knowledge and 4 being needs help with this
task. How do I want ot store this type of data? Can you help with that?

Perhaps... but I don't really understand the question! What do you mean by
"option box 1-4"? What is the structure of your table?

John W. Vinson [MVP]
 
S

strive4peace

Hi Judy,

The value of an option is stored in the option group frame -- you can
store an integer in your table that correcsponds to the proper choice.
This field would be the ControlSource for the frame that the options are in.

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
G

Guest

Well John,

I have no structure and am building as we speak. What I did was to put one
field with the name of knowledge requirements in the procedurelookup table
and then added that to my query, then I went to my form and put it in as an
option box selection option 1- Understands what the procedure is, option
2-understands but needs help performing, 3-Adequate, can consistently
perform, proficient, 4-Fluent, outstanding understanding, can teach. But I
have the form where the record selectors are the only way in which I can add
new records. I put the view to no records selectors showing but when I use
my drop down box of procedures it only lets me select for that procedure. If
i change the procedure name in the drop down box the option button that I
chose before stays there and the new procedure selected is what is recorded
in the table. Can you help me setup this properly?

Thank you,
JudyT
 
S

strive4peace

Hi Judy,

building structure as you develop is ok as long as you are willing
change all queries, forms, and reports you have built on top as you
realize and correct problems in the foundation (your data structure)

for better understanding, download and read this:

Access Basics
http://allenbrowne.com/casu-22.html
This 30-page training tutorial will orient you toward the core concepts
of Microsoft Access -- good foundation for learning programming


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
G

Guest

Okay,

I have the option group in with 1-4 options but what I want to see is
similar to what is being done on the internet these days with surveys. Like
this

Option 1
Option 2 Option 3 Option 4
Test question for what i want to see o o
o o
Test question 2 for what I want to see o o o
o
Test quesoitn 3 for what """""""

Where I want the user to click one of the options but I want all the
questions to appear on one page. Is this possible? The format in the tables
that I have now does not do this with the settings that I have now.
Can you help me set-up this format?

Best regards, JudyT
 
S

strive4peace

Hi Judy,

Basically, you have questions and answers -- and what you have presented
is easy as the anser is 1,2,3, or 4, which correcpond nicely to using an
option group on a continuous form display.

perhaps a structure like this:

*Tests*
TestID, autonumber
TestName, text

*Questions*
QuestionID, autonumber
Question, text

*TestQuestions*
TQID, autonumber
TestID, long integer -- FK to Tests
QuestionID, long integer -- FK to Questions
Ordr, long -- sort order for question on the tet
(didn't use 'Order' for the fieldname because it is a reserved word)

*People*
PID, autonumber
pTypeID, long integer -- FK to PeopleTypes
LName, text
FName, text
etc

*PeopleTypes*
pTypeID, autonumber
pType, text -- ie: 'Survey Participant'

*PeopleTests*
TestPID, autonumber
TestID, long integer -- FK to Tests
PID, long integer -- FK to People
TestDate, date

*TestAnswers*
TstAnsID, autonumber
TQID, long integer -- FK to TestQuestions
TestPID, long integer -- FK to PeopleTests
Answer, long integer

generally, you would probably choose to store an AnswerID (that
corresponds to an Answers table) instead of a numeric answer but,in your
situation, you are presenting an option group

Even though your Answer is NOT a long integer (> 32K), if you have a lot
of tests and do math on them, the intermediate calculations and results
could need to be long integers so it is a safer data type to use

NOTE: FK is Foreign Key

if your data is stored in this (or close) way, your statistics will be easy

To get all the questions to appear on one page, just use a continuous
form (or a datasheet although I prefer the former because there is more
control)

Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 

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

Similar Threads


Top