Next Issue - Setting the Order!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

So I have a form(F1) that gets its data from a query(Q2)
Q2 pulls data from table MT & table WT.

I have two fields in WT called Route and Stop#.
They show on F1.
I want to use these to set my own order for the forms.
And I need the data I enter into Route and Stop#
to be saved so when I open it up again everything is in
the order I assign.

The issue I am running into is that the form F1 will not
allow me to edit any of the fields.
How do I get around this little problem?
 
The two tables need a one-to-many relationship.

If you have not yet done, so make sure they both have a primary key, and the
related table will have a foreign key (i.e. a field that matches the primary
key of the other table.) Open the Relationships window (Tools menu), and
create the relation.

Now your form will be able to enter data into the table from the "many" side
of the relation. You need to use a different form to enter fields into the
table from the "one" side of the relation.

You can use the Sorting row in Q2 to specify the sort order you want.
 
Both have a primary key but there is no relationship between then.
I have a relationship between the "NAME" fields and "ZIPCODES"
fields, is that enough?

I have a form that is linked to the MT that allows me to make changes.
Directly to that table of course.
I guess I need to set up the "MANY SIDES" thing.
I'm still a little confused!!!
Why won't the form controlled by the query let me enter data into that
WT table? WHY WHY WHY!!!!!!!!!!!!!!!
 
To determine whether the problem is with the query or the form, try adding a
new record directly to the query.

If that fails, the relation between the 2 tables is probably not based on a
unique key, though it could be any of the reasons listed here:
Why is my query read-only?
at:
http://allenbrowne.com/ser-61.html

If you can add new records to the query, then the problem really is with the
form, so you could start examining properties such as Allow Additions and
Recordset Type.
 
It fails because, the relation between the 2 tables is
probably not based on a unique key.
The primary keys do not match each other at all.
Master List primary key is a ID # & the
DeliverT primary key is a Order #
Query Type is a "Select Query"

I'M STUMPED!!

Here is my SQL:
SELECT [MASTER LIST 10-11-06].MAP, [MASTER LIST 10-11-06].[Map Book],
[MASTER LIST 10-11-06].[Cust #], [MASTER LIST 10-11-06].[Customer Name],
[MASTER LIST 10-11-06].[Address Line 1], [MASTER LIST 10-11-06].[Address
Line 2], [MASTER LIST 10-11-06].City, [MASTER LIST 10-11-06].ST, [MASTER
LIST 10-11-06].Zip, [MASTER LIST 10-11-06].Prefix, [MASTER LIST
10-11-06].[Phone #], [MASTER LIST 10-11-06].[Release Waiver], [MASTER LIST
10-11-06].Comments, [MASTER LIST 10-11-06].Type, [MASTER LIST
10-11-06].[Check Box], DeliverT.[STOP ID], DeliverT.ORDER_NO,
DeliverT.[CARTON TOTAL], DeliverT.WEIGHT, DeliverT.WEEK, DeliverT.ROUTE,
DeliverT.[RTE #]
FROM [MASTER LIST 10-11-06] INNER JOIN DeliverT ON ([MASTER LIST
10-11-06].Zip = DeliverT.[SHIP ZIP]) AND ([MASTER LIST 10-11-06].[Customer
Name] = DeliverT.CONSULTANT)
WHERE (((DeliverT.WEEK)=[Delivery Week?]));

TIA,
Isaac
 
Isaac Sanchez said:
It fails because, the relation between the 2 tables is
probably not based on a unique key.

Excellent. You've identified the problem.

Now back to the drawing board to correct the design.
You can't have an updatable multi-table query without it.
 
Back
Top