Form pulling from Query results

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

Guest

Hello,

I have two tables; one with project information (start date, end date, status, etc), and another that I want the user to be able to complete using the form. I'm trying to populate a portion of the form with the results of a query that pulls only Active projects from the project table.

The problem is that when I am in the form, I am unable to fill in the blanks, select from pull-downs, or check the check boxes. I was able to do this before I used the query as the source...when I went straight from the project file.

Thanks in advance for your suggestions!
 
I suspect that the query is not updateable. Can you make the entry directly
in the query? If not, then that is the problem. You'll need to post the SQL
of the query.

--
Wayne Morgan
Microsoft Access MVP


Sara said:
Hello,

I have two tables; one with project information (start date, end date,
status, etc), and another that I want the user to be able to complete using
the form. I'm trying to populate a portion of the form with the results of
a query that pulls only Active projects from the project table.
The problem is that when I am in the form, I am unable to fill in the
blanks, select from pull-downs, or check the check boxes. I was able to do
this before I used the query as the source...when I went straight from the
project file.
 
Do I have to update to the query? The form entries were not intended to update the query, but the table where data will be stored about the projects.

----- Wayne Morgan wrote: -----

I suspect that the query is not updateable. Can you make the entry directly
in the query? If not, then that is the problem. You'll need to post the SQL
of the query.

--
Wayne Morgan
Microsoft Access MVP


Sara said:
status, etc), and another that I want the user to be able to complete using
the form. I'm trying to populate a portion of the form with the results of
a query that pulls only Active projects from the project table.blanks, select from pull-downs, or check the check boxes. I was able to do
this before I used the query as the source...when I went straight from the
project file.
 
Is the Record Source of the form a query? If so, the query must be an
"updateable query" to be able to make changes to the data on the form. This
doesn't mean that you have to update the query, it means that the way the
query is designed that it is capable of making updates and passing them back
to the table(s).

--
Wayne Morgan
Microsoft Access MVP


Sara said:
Do I have to update to the query? The form entries were not intended to
update the query, but the table where data will be stored about the
projects.
 
Here is the Query SQL

SELECT dbo_PROJECT1.PROJECT_ID, dbo_PROJECT1.Project_Access_ID, dbo_PROJECT1.PROJECT_STATUS_I
FROM dbo_PROJECT
WHERE (((dbo_PROJECT1.PROJECT_STATUS_ID)=2))

I'm wondering if a better way (easier) would be to pull directly from the project table, but only have active projects visible in the form. I'm a relative newbie, though and can't figure out how to do that. :-

Thanks

----- Wayne Morgan wrote: ----

I suspect that the query is not updateable. Can you make the entry directl
in the query? If not, then that is the problem. You'll need to post the SQ
of the query

--
Wayne Morga
Microsoft Access MV


Sara said:
status, etc), and another that I want the user to be able to complete usin
the form. I'm trying to populate a portion of the form with the results o
a query that pulls only Active projects from the project tableblanks, select from pull-downs, or check the check boxes. I was able to d
this before I used the query as the source...when I went straight from th
project file
 
You only have one of the tables in the query. The fields for the controls to
be bound to the other table aren't part of the Form's Record Source.

Are there to be multiple records in the second table for each record in the
Projects table? You may want to use a subform. Place the Active Project data
in the main form and the related data from the other table in the subform.
Link the two forms on the Project_ID field.

--
Wayne Morgan
Microsoft Access MVP


Sara said:
Here is the Query SQL:


SELECT dbo_PROJECT1.PROJECT_ID, dbo_PROJECT1.Project_Access_ID, dbo_PROJECT1.PROJECT_STATUS_ID
FROM dbo_PROJECT1
WHERE (((dbo_PROJECT1.PROJECT_STATUS_ID)=2));

I'm wondering if a better way (easier) would be to pull directly from the
project table, but only have active projects visible in the form. I'm a
relative newbie, though and can't figure out how to do that. :-}
 
Sorry to ask so many questions!

Is this what you mean by adding the fields for the controls to be bound to the other table ?

SELECT dbo_PROJECT1.PROJECT_ID, dbo_PROJECT1.Project_Access_ID, dbo_PROJECT1.PROJECT_STATUS_ID
FROM Client_Req_Matrix LEFT JOIN dbo_PROJECT1 ON Client_Req_Matrix.PROJECT_ID=dbo_PROJECT1.PROJECT_ID
WHERE (((dbo_PROJECT1.PROJECT_STATUS_ID)=2));

It seems "LEFT JOIN" is not what I need. ???

Thanks SO much for your help!

----- Wayne Morgan wrote: -----

You only have one of the tables in the query. The fields for the controls to
be bound to the other table aren't part of the Form's Record Source.

Are there to be multiple records in the second table for each record in the
Projects table? You may want to use a subform. Place the Active Project data
in the main form and the related data from the other table in the subform.
Link the two forms on the Project_ID field.

--
Wayne Morgan
Microsoft Access MVP


Sara said:
Here is the Query SQL: dbo_PROJECT1.PROJECT_STATUS_ID
FROM dbo_PROJECT1
WHERE (((dbo_PROJECT1.PROJECT_STATUS_ID)=2));
project table, but only have active projects visible in the form. I'm a
relative newbie, though and can't figure out how to do that. :-}
Thanks!
----- Wayne Morgan wrote: -----
I suspect that the query is not updateable. Can you make the entry
directly
in the query? If not, then that is the problem. You'll need to post the SQL
of the query.
Wayne Morgan
Microsoft Access MVP
 
Yes, that is basically what I mean. You have joined in the other table, but
haven't selected any of its fields for the query's output. However, guessing
at what you are doing, I suspect that a subform will suit you better.
 
Another idea. Base the form on the second table or a query from it and use
DLookup to fill in the few items from the first table.
 
Back
Top