Form - Display other field after satisfying a criteria

Newbie_1981

New member
Local time
Today, 12:11
Joined
Jan 4, 2011
Messages
7
I'm new with Database and I've been reading books and gone online for the past 5 days and still lost. Can anybody please help or provide me some guidance? Below is the description of my problem. Thank you.

I've created a form for data entry for quality issues. In the form, the operator enter Part #, Date, Operator Name, Minor Problem, Major Problem, etc.

In the Minor Problem and Major Problem field, the operator needs to enter the quantity on each field. After entering the value, the form will display extra field for detail description of the problem.

For example, the operator entered 10 units in the Major Problem field. Thus, the extra field such as Bad Solder Joint, Leakage on Valve, and Loosen Nut will be display in the same form.

I created all these field in a single table.

I tried using Macro to open different form for different condition (Major or Minor problem). However, my data in the table is all messed up.
 
It would appear that your table design is all messed up too (sorry but true). Post a copy of your tables and fields and we might be able to help you redesign it. You should not have things like Bad Solder Joint, Leakage on Valve, etc. as COLUMNS in a table. They should be ROWS in a table which link up to the main data.
 
It would appear that your table design is all messed up too (sorry but true). Post a copy of your tables and fields and we might be able to help you redesign it. You should not have things like Bad Solder Joint, Leakage on Valve, etc. as COLUMNS in a table. They should be ROWS in a table which link up to the main data.

I've everything on 1 table. I've attached a copy of my table for you to view.

moz-screenshot-3.png
 

Attachments

  • untitled.JPG
    untitled.JPG
    23.8 KB · Views: 96
Try to understand This applies to:
  • Microsoft Office Access 2007
  • Microsoft Office Access 2003
  • Microsoft Access 2002 Standard Edition
However the basic concept is same for all the version of Microsoft Access.
Hope this will help to normalize your tables and their relationship.



Thank you. I'll go back and review my table again.
 
I read the information on the tables and I don't think it needs to normalize. In my tables, I don't have any primary key so I used autonumber to generate. So, I tried breaking my table into several tables. I tried generate the but my data is messed up.

Is there any other way to do it? Is it possible to set a criteria for one field. If the value of the field entered is greater than zero, then other criteria is display.

Do I have to use VB to do it?
 
Are you able to post a copy of your DB?

John

I managed to create a subform and it's somewhat solved the problem after many trial and error. Maybe I'm missing the concept a little so I'll read more about it over the weekend.

Now, I need help on the making the subform visible and invisible. I've attached my form for you to view. The first page is the screen of the form before data being entered. The second page is the screen of the form after data being entered.

I used the code " Me.[Major subform].VISIBLE = (Me.[MAJOR] > 0)" to make my subform visible or invisible. Thus, if the value on Major field is 0. Then the subform is invisible. I keyed the code at Event afterupdate.

How can I make the Testing field move up if the form is invisible? I don't want the empty space between the testing and Minor field. Do I need to use VB program? What can I do?

Thank you.
 

Attachments

You've post a screen shot of a form, are you able to post a copy of your DB :confused:

Book mark this site for your future reference, it has the correct syntax for referring to sub-forms and their controls.
 
You've post a screen shot of a form, are you able to post a copy of your DB :confused:

Book mark this for your future reference, it has the correct syntax for referring to sub-forms and their controls.

This is the database for the program. I didn't use the table minor since I can't enforce the 3 table together using Name_insp Primary Key.

Thanks for the syntax link.
 

Attachments

I read the information on the tables and I don't think it needs to normalize. In my tables, I don't have any primary key so I used autonumber to generate. So, I tried breaking my table into several tables. I tried generate the but my data is messed up.

Is there any other way to do it? Is it possible to set a criteria for one field. If the value of the field entered is greater than zero, then other criteria is display.

Do I have to use VB to do it?

You want to display something i.e a subform if a condition is true? this you can do easily with VBA codes in event procedures, but as a good database developer you should keep your tables integrity, normalizations, and relationships as clean is possible to prevent it from being messed.

In your database you should have a unique key (a primary key) in your tables to join the referring records to the concerned records in another table. This is the basic rule for Relational Database Management System, otherwise you will messed up all your data.
 

Users who are viewing this thread

Back
Top Bottom