Dilemma with form bound to a query....

D

Dupatt

How can I enter data into my tables through a form bound to a query? There
must be a way but it eludes me if there is. I am fairly new at this so
lots of things baffle me at this point. Please help. Pat
 
A

Albert D. Kallal

Dupatt said:
How can I enter data into my tables through a form bound to a query?
There must be a way but it eludes me if there is. I am fairly new at
this so lots of things baffle me at this point. Please help. Pat
--

What you ask is actually the normal way that ms-access works.

The process would be:


use query builder, build your query.

Then, use the form wizard, and use your query as the data source.

That should get you a form based on your query.

The above is a nutshell summary, but much how it works.

if your query is to involves more then one table, then of course we have to
approaching things different, but lets take this one step at a time.

Try building your query, and then save it.

You should try opening the query, try editing some data in the datasheet
mode to ensure that your query is ok, and works the way you want.

Then, try the forms wizard, and supply that query you made.

If you are brand new to ms-access, you should get a book, or do some
reading. It bit harder then word, or excel to get up to speed with...

If you table involves one main reocrd, and then additnoal "many" child
reocrds, then don't use a query, but use a sub-form for the child reocrds.
 
D

Dupatt

Thank you for your answer. I am working with two tables, one contains the
Person information with an identifying number and the other contains
activities related to the Person joined by the ID number.
I have tried a subform and it is just fine for the data viewing and entry
but I have tried to view a print preview and my subform will not show up. I
know forms are NOT for printing reports are! Even so, why does the subform
not show up to preview?
 
A

Albert D. Kallal

Dupatt said:
Thank you for your answer. I am working with two tables, one contains the
Person information with an identifying number and the other contains
activities related to the Person joined by the ID number.
I have tried a subform and it is just fine for the data viewing and entry
but I have tried to view a print preview and my subform will not show up.
I know forms are NOT for printing reports are! Even so, why does the
subform not show up to preview?

Gee, I don't know. (I not tried to print forms + a sub-form as of yet. I
always just used a report).

At least now you got the hang of how two tables can be used on a form.

Perhaps someone else will chime in with some suggestions, but in the mean
wile, I would just build a report as they are far more clean to print
anyway.....

If you want to print JUST the current record you could even place a button
on the form (maim form part).

the code behind the button would be:

me.Refresh
docmd.Openreprot "nameofreport",,,"id = " & me!id

The above refresh forces a disk write (since the report will take data from
the tables...we have to write the current record to disk).
 
Top