Can u Use a Form and SubForm based on one table/query


G

Guest

I'm trying to set up a simple form that allows edits and additions to the
contents of tbl Brac Moves. The table has multiple moves for a site so there
are repeating base names. I know this is not great design but I am trying to
complete a few tasks before looking at how to do it correclty from the
start....

Question is, can Access use a form to show field1 field 2 and field 3 and
then a subform that shows the many values of field4 where fields1-4 are all
in one table?

My attempts so far -
Record source - Form and subform - tried tbl Brac Moves for both; tried qry
* from tbl BRAC Moves for header and tbl BRAC Moves for subform (this is
where I want to add records), and tried qry* from tbl Brac Moves on both form
and subform. The closest I get is all moves display in the subform but when
I go to add a new move, I get a This Field is Read Only. I've checked the
properites to make sure both form and subform allow edits, deletions, add new
and no on Data Entry.

Any ideas?
Thanks - chip

Use unbound control for base lookup in form header and subform to display
moves. The display
 
Ad

Advertisements

L

Lynn Trapp

I'm trying to set up a simple form that allows edits and additions to the
contents of tbl Brac Moves. The table has multiple moves for a site so
there
are repeating base names. I know this is not great design but I am trying
to
complete a few tasks before looking at how to do it correclty from the
start....

As you are seeing, using a "not great design" can cause all kinds of
problems. You will save yourself more time and effort than you can imagine
if you will "do it correctly" first.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
 
T

tina

Question is, can Access use a form to show field1 field 2 and field 3 and
then a subform that shows the many values of field4 where fields1-4 are all
in one table?

well, that doesn't really make sense. if you show three fields of a record
in a form, showing the fourth field in a subform will not change the fact
that you're dealing with a single record. each record in a table has only
one instance of each field in that table. you can store multiple values in a
single field *in the same record* (though that's atrociously bad design),
but if you move to a new record in the subform, then you are starting a
whole new record *in the table*.

if you need to store multiple values of one field in a table, for one
record, then that field needs to be in a "child" table, along with the
parent table's primary key field used as a foreign key.
I know this is not great design but I am trying to
complete a few tasks before looking at how to do it correclty from the
start....

there's not much point in building part of the database (queries, forms,
etc) on a poorly designed table structure *before* fixing the
tables/relationships. as soon as you change the tables, you're going to have
to rebuild the objects that are based on those tables.

hth
 
G

Guest

OK - I agree that is better - just was hoping to get a quick solution to
solve an issue. As usual - client wants solution ASAP and doesn't care what
it takes.

Thanks for your advise!
 
Ad

Advertisements

T

tina

you're welcome, and good luck! :)


chip said:
OK - I agree that is better - just was hoping to get a quick solution to
solve an issue. As usual - client wants solution ASAP and doesn't care what
it takes.

Thanks for your advise!
 

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