design question

V

vassilis

goodevening

i have 2 retated tables, one query will amost all fields and a form comes
from that query(main form the data from the first table and subform all data
from the second table). i want to input data in the first tbl(usualy a copy
paste), and then using my form-subform make every change i want to all the
others fields.
but i noticed that when i give data only to the first tbl, the query doesnt
work, shows nothing, so does the form.
is there any way to resolve that? i hope there is something
 
J

John Vinson

goodevening

i have 2 retated tables, one query will amost all fields and a form comes
from that query(main form the data from the first table and subform all data
from the second table). i want to input data in the first tbl(usualy a copy
paste), and then using my form-subform make every change i want to all the
others fields.
but i noticed that when i give data only to the first tbl, the query doesnt
work, shows nothing, so does the form.
is there any way to resolve that? i hope there is something

You do not need the Query. The Subform takes care of the relationship.

Base the Mainform on the "one" side table, and the subform on the
"many" side table; use the fields defined in the Relationships window
as the master/child link fields.

John W. Vinson[MVP]
 
V

vassilis

thanks!!...but in tha situation i have another problem...i need some
expessions from the query that they dont appear into my tables ( i dont know
why) althought i have made fields for them.how i can use that data?
and one more question pls...i was looking for a way to use parameters on
query on
on/off button and i didnt find anything..
thanks!!
 
J

John Vinson

thanks!!...but in tha situation i have another problem...i need some
expessions from the query that they dont appear into my tables ( i dont know
why) althought i have made fields for them.how i can use that data?

Calculated fields should NOT be stored in your tables, at all.

Storing derived data such as this in your table accomplishes
three things: it wastes disk space; it wastes time (almost
any calculation will be MUCH faster than a disk fetch); and
most importantly, it risks data corruption. If one of the
underlying fields is subsequently edited, you will have data
in your table WHICH IS WRONG, and no automatic way to detect
that fact.

Just redo the calculation whenever you need it, either as a
calculated field in a Query or in the control source of a Form or a
Report textbox.
and one more question pls...i was looking for a way to use parameters on
query on
on/off button and i didnt find anything..
thanks!!

There is no "on/off button" in Access. Could you explain what you
mean?

John W. Vinson[MVP]
 
V

vassilis

i have those yes/no data type fields..the true/false format...and i dont know
how to use them in a parameter query...
 
J

John Vinson

i have those yes/no data type fields..the true/false format...and i dont know
how to use them in a parameter query...

A Checkbox on a Form can be used as a criterion. It doesn't matter
whether the field is displayed as yes/no, as a checkbox, or other
options; TRUE is stored as -1 and FALSE as 0, so you can use a
checkbox, a textbox formatted Yes/No, a combo box with values -1 and
0, or whatever is convenient.

A simple prompt [Yes or no?] will work if the user types the words YES
or NO.

John W. Vinson[MVP]
 
Top