J
Jonathan Fisher
Two newbie questions about queries:
(1) Using Access 2000, I'm trying to create a standard timesheet-type
DB, including a field which is equal to the sum of the activity entries
for a given person on a given day. I created a SQL query:
SELECT DISTINCTROW tblActivity.PersonDayKey, Sum(tblActivity.TimeSpent)
AS [Sum Of TimeSpent]
FROM tblActivity
GROUP BY tblActivity.PersonDayKey;
Now, whenever I try to create a form which includes the second field
from that query (ie, the "Sum(....)" field), none of the fields on the
form are modifiable. For example, I create a form based on the table
tblPersonDay (which has a primary key of PersonDayKey), relating to the
above query via PersonDayKey (the join type of the relationship is "only
include rows where the joined fields from both tables are equal", which
I assume is a standard inner-join). I then include some other fields
from tblPersonDay, which would normally be modifiable -- but on this
form they're not.
Can anyone tell me why this should be? (I'm a little hazy on exactly
how Access treats relationships between tables, but I can't see any
reason the fields should not be modifiable.)
(2) One other question -- Can anyone tell me how to change the name of
the database file to which an append-query will do its appending? If I
try reference myQuery.DestinationDB or myQuery.DestConnectStr (as
described in the help reference) I get an error to the effect of
"Property not found in this object".
(1) Using Access 2000, I'm trying to create a standard timesheet-type
DB, including a field which is equal to the sum of the activity entries
for a given person on a given day. I created a SQL query:
SELECT DISTINCTROW tblActivity.PersonDayKey, Sum(tblActivity.TimeSpent)
AS [Sum Of TimeSpent]
FROM tblActivity
GROUP BY tblActivity.PersonDayKey;
Now, whenever I try to create a form which includes the second field
from that query (ie, the "Sum(....)" field), none of the fields on the
form are modifiable. For example, I create a form based on the table
tblPersonDay (which has a primary key of PersonDayKey), relating to the
above query via PersonDayKey (the join type of the relationship is "only
include rows where the joined fields from both tables are equal", which
I assume is a standard inner-join). I then include some other fields
from tblPersonDay, which would normally be modifiable -- but on this
form they're not.
Can anyone tell me why this should be? (I'm a little hazy on exactly
how Access treats relationships between tables, but I can't see any
reason the fields should not be modifiable.)
(2) One other question -- Can anyone tell me how to change the name of
the database file to which an append-query will do its appending? If I
try reference myQuery.DestinationDB or myQuery.DestConnectStr (as
described in the help reference) I get an error to the effect of
"Property not found in this object".