By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,101 Members | 971 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,101 IT Pros & Developers. It's quick & easy.

Sorting in forms

P: n/a
Access 2002 von Winblows XP SP 3

I have a table with 4 fields: Name, Date, and 2 check boxes.

Users will have to work the check boxes, the rest must be protected.
The list needs a sort order: Name, then Date.

a) I base the form on the table -> I can use one field only for
sorting.

b) I create a query with the proper sort order and base the form on
the query: the check boxes become uneditable. Same if I try to work
with the query directly.

Catch 22? Or am I missing something? I usually use Filemaker, so I am
a bit lost here.

TIA
--
http://clk.ch
Nov 13 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a

"Christoph L. Kaufmann" <cl*@freesurf.ch> wrote in message
news:41***************@news.individual.de...
Access 2002 von Winblows XP SP 3

I have a table with 4 fields: Name, Date, and 2 check boxes.

Users will have to work the check boxes, the rest must be protected.
The list needs a sort order: Name, then Date.

a) I base the form on the table -> I can use one field only for
sorting.

b) I create a query with the proper sort order and base the form on
the query: the check boxes become uneditable. Same if I try to work
with the query directly.

Catch 22? Or am I missing something? I usually use Filemaker, so I am
a bit lost here.

TIA
--
http://clk.ch


Use a query. If the form's AllowEdit property is set you should be able to
edit it. If you can't, then it may be that you have constructed the query
in a way to make it non-updateable. Post the SQL statement for the query.
Also you should bear in mind that a well-designed table usually has a
primary key (its absence can cause editing problems). You should also avoid
fields names like "Date" and "Name" - these are reserved words in Access.
Nov 13 '05 #2

P: n/a
"Eric Schittlipz" <er**@schittlipz.com> hat geschrieben:
Use a query. If the form's AllowEdit property is set you should be able to
edit it. If you can't, then it may be that you have constructed the query
in a way to make it non-updateable. Post the SQL statement for the query.


SELECT qryPatienten.Name, tblMahlzeitenteilnahme.Datum,
tblMahlzeitenteilnahme.Brunch, tblMahlzeitenteilnahme.Abendessen,
tblMahlzeitenteilnahme.Abt, tblMahlzeitenteilnahme.Unterschrift,
tblMahlzeitenteilnahme.PatientIn
FROM tblMahlzeitenteilnahme INNER JOIN qryPatienten ON
tblMahlzeitenteilnahme.PatientIn = qryPatienten.PatNr
ORDER BY qryPatienten.Name, tblMahlzeitenteilnahme.Datum
WITH OWNERACCESS OPTION;
--
http://clk.ch
Nov 13 '05 #3

P: n/a
"Christoph L. Kaufmann" <cl*@freesurf.ch> wrote in message
news:41***************@news.individual.de...
"Eric Schittlipz" <er**@schittlipz.com> hat geschrieben:
Use a query. If the form's AllowEdit property is set you should be able
to
edit it. If you can't, then it may be that you have constructed the query
in a way to make it non-updateable. Post the SQL statement for the query.


SELECT qryPatienten.Name, tblMahlzeitenteilnahme.Datum,
tblMahlzeitenteilnahme.Brunch, tblMahlzeitenteilnahme.Abendessen,
tblMahlzeitenteilnahme.Abt, tblMahlzeitenteilnahme.Unterschrift,
tblMahlzeitenteilnahme.PatientIn
FROM tblMahlzeitenteilnahme INNER JOIN qryPatienten ON
tblMahlzeitenteilnahme.PatientIn = qryPatienten.PatNr
ORDER BY qryPatienten.Name, tblMahlzeitenteilnahme.Datum
WITH OWNERACCESS OPTION;
--
http://clk.ch

Hi Christoph
It *is* probably the SQL statement which is causing the problem.
Your original post said "I have a table with 4 fields: Name, Date, and 2
check boxes..." however it is now clear it is a bit more complicated.
Your query joins a table (tblMahlzeitenteilnahme) with a query
(qryPatienten) but we do not know the SQL statement for qryPatienten and we
don't know the primary/foreign keys for the tables.
Can you not create a query only based on tables? Ideally with a maximum of
two tables, both with a primary key and one table also having an indexed
foreign key from the other table.


Nov 13 '05 #4

P: n/a
"Eric Schittlipz" <er**@schittlipz.com> hat geschrieben:

Hi Eric
Your query joins a table (tblMahlzeitenteilnahme) with a query
(qryPatienten) but we do not know the SQL statement for qryPatienten and we
don't know the primary/foreign keys for the tables.
Can you not create a query only based on tables? Ideally with a maximum of
two tables, both with a primary key and one table also having an indexed
foreign key from the other table.


I didn't assume thing might get that complicated; I only wanted to
sort the list in a form. Since I'm running out of time, I accept I
can't solve the problem right now. I'm saving this articles and I'll
try later.

Thank you and best regards
--
http://clk.ch
Nov 13 '05 #5

P: n/a
"Eric Schittlipz" <er**@schittlipz.com> hat geschrieben:
It *is* probably the SQL statement which is causing the problem.


The problem is now solved; after I realized I can perfectly sort a
form using recods/filters/special filters etc., I could base the form
on the table again.

Thanks for your help.
--
http://clk.ch
Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.