Form doesn't run query

  • Thread starter Thread starter FJB
  • Start date Start date
F

FJB

I have several forms linked to queries. I had to revise the form, so I
did one form and then saved it under several names. I opened each form,
changed the background color and the title, and the right-clicked in
the upper left hand corner and selected porperties. I then chose the
appropriate query for the form. The query works when I click on the
query, but does not run when I click on the form.

Any help will be greatly appreciated.

Frank
 
Please define 'does not run' in this context. I assume that you have
selected a query as the form's Record Source? And that you have controls on
the form that are bound to fields in that query? If yes, then opening the
form will "run" the query in order to display data from it. If the query
doesn't select any records, the form won't display any data.

Please provide more details about what you're seeing (or not seeing) that
leads you to the conclusion that the query 'does not run'.
 
I don't mean to be repetitive, but what does this mean.... the form doesn't
display any records? the form doesn't display any controls? the form doesn't
do anything? The problem could be a number of items, and I'm asking for
these clarifications so that we can narrow down which one(s) are the likely
culprits.
 
FJB,

Still not clear. I agree with Ken. Please be more specific:

1. What is your RecordSource of the form?
2. Default View? (single form, datasheet.....)
3. Any fields inserted in the form?
4. If you inserted fields, did you bound each fields with Control Source?
 
Ask all the questions you want. I'll do my best to answer them. The
query is a query with a criteria specified, i.e. match the problem
name. When I run the query with a certain parameter, I get 87 records.
The query works. When I open the associated form I get an empty form. I
have confirmed that the record source in form properties is the correct
query.

Thanks for your help
 
FJB said:
Ask all the questions you want. I'll do my best to answer them. The
query is a query with a criteria specified, i.e. match the problem
name. When I run the query with a certain parameter, I get 87 records.
The query works. When I open the associated form I get an empty form.
I have confirmed that the record source in form properties is the
correct query.

Thanks for your help

Is the DataEntry property for the form enabled? Does it have a filter
applied?
 
Also, is the form's AllowAdditions property set to Yes or No? And is the
query updatable?
 
The DatEntry property is set to YES. There is no filter applied. The
forms AllowAdditions property is set to YES. Not sure what you mean by
"Is the query updatable?"
 
Does the query allow you to edit the data that are displayed? Or does the
query allow you to enter new records?

Based on the settings for your form, my guess is that the query is not
updatable. If it's not, those form settings will show an empty form because
the form is being told to only allow the entry of new data records (Data
Entry is Yes) -- not to show already entered data records -- and if the
query won't allow you to enter new data, the form cannot do anything.

Try setting the Data Entry property to No and see if records then are
displayed.
 
Setting the DataEntry property to NO had no effect.

The query is updateable when new records ardded to the main Table
through another form. This query allows us to search for a value in a
particular field, i.e. Tom in the name field (not the name of the
field). The query functions fine.

The form was designed to show the information in a one page format. As
I said in the original message, I updated one form and then did
multiple "save as" to get the various forms. I then changed the
DataSource on each form to the appropriate query.None of the forms
work. I figured if we could get one to work I coul apply the same
settings to the others.

Thanks
 
Are the controls on the form bound to the correct fields in the form's
recordsource query?
 
Yes they are.

The forms are now working perfectly. It appears the update property
needed to be set to no. Didn't do this when I originally set up the
forms, but after copy it, who knows.

Thanks to all who contributed.

Frank
 
What is an "update" property? I'm not familiar with that one. Glad it's
working.
 
Back
Top