Typing in query is changing table?

jbphoenix

Registered User.
Local time
Today, 14:42
Joined
Jan 25, 2007
Messages
98
Ok this one has me puzzled. I split my database to try out it and see how it works. I have a form where the user enters an RMA number then clicks a cmd btn which runs a query. The query runs fine. However the results get displayed like they are a form in datasheet view. It has the record selector at the bottm and here's the good part - the user can modify anything in the results and it saves it to the table the query is run from.
I attached a screen shot of how the results are being displayed.

Any ideas why this is happening?
 

Attachments

  • untitled.JPG
    untitled.JPG
    26.3 KB · Views: 164
The last row with the * in your image signifies that your query is updatable, meaning any changes made in the query will be stored in the table on which the query is based.

Since you are running the query from a form, you can make the query open as read only:-
Code:
Private Sub Command0_Click()
  DoCmd.OpenQuery "QueryName", , acReadOnly
End Sub
.
 
Ok this one has me puzzled. I split my database to try out it and see how it works. I have a form where the user enters an RMA number then clicks a cmd btn which runs a query. The query runs fine. However the results get displayed like they are a form in datasheet view. It has the record selector at the bottm and here's the good part - the user can modify anything in the results and it saves it to the table the query is run from.
I attached a screen shot of how the results are being displayed.

Any ideas why this is happening?

Just for your information - most queries actually are updateable. There are some exceptions, of course. See here for more about when they aren't:
http://allenbrowne.com/ser-61.html
 
Thanks Jon and Bob. I guess I hadn't really tried to edit the data in my queries in the past. I tried it this time since I have a user that likes to change things he's not supposed to.
 

Users who are viewing this thread

Back
Top Bottom