Record Source error help

hockey8837

Registered User.
Local time
Today, 18:32
Joined
Sep 16, 2009
Messages
106
Hi,
My DB is a 'Frankenstein' db of the Access templates for Students and Contacts. I have in it a form, 'Location List,' which displays all of my records just as the original templates had a 'Students' list, and a similar form, 'Contacts List'.

In my forms, I have a text box (or column, on the datasheet view) which many of the Access templates have; it is the 'Open' hyperlink that takes you to the details form of that record.

When I click this 'open', it does, in fact, open the correct record in the 'Details' form. However, when I close the 'Details' form, I see that this has generated an error in the parent 'List' form, in both the 'Contacts' and the 'Location'.

This error says:
The record source 'SELECT "-1" as [ID],"(Manage Filters)" as [Filter Name] FROM Filters UNION SELECT "0" as [ID], "(Clear Filter)" as [Filter...' specified on this form or report does not exist.

The name of the recordsource may be misspelled, the recordsource was deleted or renamed, or the record source exists in a different database.

In the Form or Report's Design view, display the property sheet by clicking the Properties button, and then set the RecordSource property to an existing table or query.
However, both these forms are set to particular queries, and are displaying data properly.

What's going on and how do I fix it?
Thanks!
 
check the code behind all of the events for all of your forms, and then check the rs property of all of the forms as well. a fast way to search through your code modules and object modules are to enter a key phrase that is in the error message. that's always helped me.

for example, get to your code window and hit Ctrl+F, and type something like "FROM filters UNION" in the search box, and search the entire project for the matches.

pick a phrase from the error message that you're sure you can match, as error messages sometimes don't return EXACT syntax of the code that is in an error state.

good luck with it!
 
Pretty odd as well that you're using numbers ("-1", "0") as names of fields. Surely "(Manage Filters)" isn't a field in Filters table. Change all those. Also rename your Filters table to something else.

'SELECT "-1" as [ID],"(Manage Filters)" as [Filter Name] FROM Filters UNION SELECT "0" as [ID], "(Clear Filter)"
 
'SELECT "-1" as [ID],"(Manage Filters)" as [Filter Name] FROM Filters UNION SELECT "0" as [ID], "(Clear Filter)"

inet,

this crazy line above was so strange looking to me that I regarded it as an access generated error message resulting from very buggy code. I didn't even bother thinking that this person named a field as -1, although that's what the error supposedly says. :D
 
inet,

this crazy line above was so strange looking to me that I regarded it as an access generated error message resulting from very buggy code. I didn't even bother thinking that this person named a field as -1, although that's what the error supposedly says. :D
Haha! It's a rather unusual naming convention. Let's see how the OP gets on.
 
Hello Everyone,
I was able to find it after checking behind all the events (which was tedious); the DB template I'd started with had a 'Filters' table, form, and macro to aid the user to search, and I'd deleted these because I wasn't going to use them. But, on one of the forms I'd formatted, it had a 'Save Filter' button to save the filtered data on the form. This was the problem in the requery when both my forms were updating. I'm not sure where the crazy naming conventions (-1/etc.) were popping up from, but in deleting the 'Save Filter' button, I was able to eliminate the error messages! weird.

Thanks for the help!
 
Hello Everyone,
I was able to find it after checking behind all the events (which was tedious); the DB template I'd started with had a 'Filters' table, form, and macro to aid the user to search, and I'd deleted these because I wasn't going to use them. But, on one of the forms I'd formatted, it had a 'Save Filter' button to save the filtered data on the form. This was the problem in the requery when both my forms were updating. I'm not sure where the crazy naming conventions (-1/etc.) were popping up from, but in deleting the 'Save Filter' button, I was able to eliminate the error messages! weird.

Thanks for the help!
 

Users who are viewing this thread

Back
Top Bottom