database has changed my query - Help!!

fuglyjowls

Registered User.
Local time
Today, 11:35
Joined
Sep 21, 2005
Messages
55
hi I hope someone can help me with a small problem.

My database crashed recently and threw a bit of a wobbly - it lost information randomly and deleted all queries, reports and macros which was really strange. I managed to copy over all of the queries etc from an older copy of the database and then worked out what it had deleted and added it all back in and everything seemed ok.

However I've just hit another problem and I cannot find out how to solve it. I have several select queries which I use to update records - ie I go into the query and add a part number on the query rather than on a table or form - it is easier to do this because I can just scan down the list rather than open a new form up each time. Most of these queries are still ok but one of them just won't let me type anything into the fields which I used to be able to get into. Can anyone tell me how I can get round this?

Thanks

FJ
 
Sometimes copying the text from the SQL view into a new query will fix problems with queries that seem like they should work but don't. Most commonly I have seen them demand a parameter input for a valid fieldname but I guess they could do the exact opposite.
 
Sometimes copying the text from the SQL view into a new query will fix problems with queries that seem like they should work but don't. Most commonly I have seen them demand a parameter input for a valid fieldname but I guess they could do the exact opposite.

thanks for suggestion but it hasn't worked unfortunately :confused: Any other ideas?
 
Can anyone help? This is holding up my work and I urgently need to get it sorted so appreciate any ideas.
 
occasionally, i have had a corrupted query that I had to rebuild from scratch. I would try that, tbh.

now - your initial problem begs the question/raises issues

a) is it split? it's much safer and cleaner to separate the data from the code AND
b) do you keep a copy of the latest version of the database - so that in the event of couuruption the code repair is a non-issue.
 
thanks for suggestion but it hasn't worked unfortunately
confused.gif
Any other ideas?

You couldn't open to view the SQL text??

If so you can access it from the immediate window.

Just open any codemodule and in the immediate window type in this and hit enter:

?currentdb.querydefs("NameOfQuery").SQL

The SQL should be printed out and you can copy it and paste it into a fresh query.

JR
 
Most of these queries are still ok but one of them just won't let me type anything into the fields which I used to be able to get into.
Does this mean that the query opens but it's read-only? Meaning you can't edit or update the records?
 
Does this mean that the query opens but it's read-only? Meaning you can't edit or update the records?

Yes that's right - it opens up but I can't add anything into the fields I used to be able to edit.
 
You couldn't open to view the SQL text??

If so you can access it from the immediate window.

Just open any codemodule and in the immediate window type in this and hit enter:

?currentdb.querydefs("NameOfQuery").SQL

The SQL should be printed out and you can copy it and paste it into a fresh query.

JR

Sorry not explaining myself clearly - I can copy and paste the SQl text but pasting it into a new query still had the same problem
 

Users who are viewing this thread

Back
Top Bottom