exclusive access, table and query not in harmony

antonyx

Arsenal Supporter
Local time
Today, 23:56
Joined
Jan 7, 2005
Messages
556
ok, i came across a similar problem in another part of my database.. this error "runtime error 3008, the table bookings is already opened exclusively by another user"

this is the general problem..

table1 (stores main details)

query1 (uses fields from table1 to show selected records based on criteria)

form1 (data entry form for table1.. recordset for the Form set to table1)


mainform1 (just a blank form with an open form button which opens form1 and allows records to be entered)

now... i basically wanted to display the results of query1 in a listbox , and place that listbox on my mainform1)

i can view the results in the listbox from the query1 (which is based on table1 remember).. but as soon as i click the openform1 button, it tells me i dont have access..

that means that because i am using a query, based on table1 on my main form, it does not let me access table1 directly...

how can this matter be resolved generally? is there like a general solution to this problem because it keeps propping up..
 
Not sure if this will work or not because i'm not sure of the rights situation. But the best thing to try and do is when you click the button to open up your form, go to the code behind (button.click) and put in "DoCmd.Close" which will close the main form you are on (which closes the query), and then have the code in there to open up your form.

Inside form1, if you want the user to have the main menu with the list box when they leave, just create a button on form1, in the code behind put in "DoCmd.Openform "Mainform".

Hope that helps.. that would be an easy solution unless they need that mainform while they are on the form1..
 

Users who are viewing this thread

Back
Top Bottom